Skip to main content

Module types

Module types 

Source
Expand description

All A2A protocol wire types.

Modules§

agent_card
Agent card and capability discovery types.
approval
An agent asking a person before it acts, and the person’s answer bound to exactly what was asked.
artifact
Artifact types for the A2A protocol.
auditaudit
Tamper-evident audit records (ADR 0015).
auth_rejection
Why a request was refused on authentication or authorization grounds.
budget
A budget that travels down the delegation chain: a deadline and named meters (ADR 0023).
cancel_cause
Who stopped a canceled task, as something a caller can match on (COR-04, E03 R3).
delegation_journal
A supervisor’s record of the children it has delegated to, kept so that a restart can find them again (ADR 0030).
error
A2A protocol error types.
events
Server-sent event types for A2A streaming.
extensions
Agent extension and card-signature types.
failure
Why a task failed, as something a caller can match on.
halt
The refusal of a halted server, as a caller reads it (COR-05, ADR 0049 decision 4).
idempotency
Client-supplied idempotency keys for message/send, as a declared extension.
jsonrpc
JSON-RPC 2.0 envelope types.
lease
A lease on a delegated task: the child stops when its parent stops renewing it (ADR 0020).
lineage
Task lineage: which job a task belongs to, and how far down the job’s tree it is (ADR 0034).
message
Message types for the A2A protocol.
method
The A2A v1.0 service methods, mirrored from the ratified specification.
params
JSON-RPC method parameter types.
protoproto
Canonical A2A protobuf message types (lf.a2a.v1) and conversions.
provenance
Who made a message or an artifact, and whether a machine did: a marker, and a signature over the content that carries it.
push
Push notification configuration types.
required
The REQUIRED fields of a2a.proto that neither wire format’s parser enforces, checked the same way at both ends.
responses
RPC method response types.
security
Security scheme types for A2A agent authentication.
serde_helpers
Serialization helpers for reducing allocation overhead.
signingsigning
Agent card signing and verification (spec §8.4).
steering
Steering a running task: a message to a task that is still working, as a declared extension (ADR 0036).
task
Task types for the A2A protocol.
trace_context
W3C Trace Context — the traceparent and tracestate headers.

Structs§

A2aError
The canonical error type for A2A protocol operations.
AgentCapabilities
Defines optional capabilities supported by an agent.
AgentCard
A self-describing manifest for an agent. It provides essential metadata including the agent’s identity, capabilities, skills, supported communication methods, and security requirements.
AgentCardSignature
AgentCardSignature represents a JWS signature of an AgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
AgentExtension
A declaration of a protocol extension supported by an Agent.
AgentInterface
Declares a combination of a target URL, transport and protocol version for interacting with the agent. This allows agents to expose the same functionality over multiple protocol binding mechanisms.
AgentProvider
Represents the service provider of an agent.
AgentSkill
Represents a distinct capability or function that an agent can perform.
ApiKeySecurityScheme
Defines a security scheme using an API key.
Artifact
Artifacts represent task outputs.
ArtifactId
Opaque unique identifier for an Artifact.
AuthRejection
A refused credential, as carried by A2aError::auth_rejection.
AuthenticationInfo
Defines authentication details, used for push notifications.
AuthorizationCodeFlow
Defines configuration details for the OAuth 2.0 Authorization Code flow.
CancelTaskParams
Represents a request for the CancelTask method.
ClientCredentialsFlow
Defines configuration details for the OAuth 2.0 Client Credentials flow.
ContextId
Opaque unique identifier for a conversation context.
DeletePushConfigParams
Represents a request for the DeleteTaskPushNotificationConfig method.
DeviceCodeFlow
Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628).
FileContent
Content of a file part.
GetExtendedAgentCardParams
Represents a request for the GetExtendedAgentCard method.
GetPushConfigParams
Represents a request for the GetTaskPushNotificationConfig method.
HttpAuthSecurityScheme
Defines a security scheme using HTTP authentication.
ImplicitFlow
Deprecated: Use Authorization Code + PKCE instead.
JsonRpcError
The error object within a JSON-RPC 2.0 error response.
JsonRpcErrorResponse
An error JSON-RPC 2.0 response.
JsonRpcRequest
A JSON-RPC 2.0 request object.
JsonRpcSuccessResponse
A successful JSON-RPC 2.0 response.
JsonRpcVersion
The JSON-RPC protocol version marker.
ListPushConfigsParams
Represents a request for the ListTaskPushNotificationConfigs method.
ListPushConfigsResponse
Represents a successful response for the ListTaskPushNotificationConfigs method.
ListTasksParams
Parameters for listing tasks with optional filtering criteria.
Message
Message is one unit of communication between client and server.
MessageId
Opaque unique identifier for a Message.
MessageSendParams
Represents a request for the SendMessage method.
MutualTlsSecurityScheme
Defines a security scheme using mTLS authentication.
OAuth2SecurityScheme
Defines a security scheme using OAuth 2.0.
OpenIdConnectSecurityScheme
Defines a security scheme using OpenID Connect.
Part
Part represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON).
PasswordOAuthFlow
Deprecated: Use Authorization Code + PKCE or Device Code.
SecurityRequirement
Defines the security requirements for an agent.
SendMessageConfiguration
Configuration of a send message request.
SerBuffer
Thread-local reusable serialization buffer.
StringList
A list of strings.
Task
Task is the core unit of action for A2A.
TaskArtifactUpdateEvent
A task delta where an artifact has been generated.
TaskId
Opaque unique identifier for a Task.
TaskIdParams
Represents a request for the SubscribeToTask method.
TaskListResponse
Result object for ListTasks method containing an array of tasks and pagination information.
TaskPushNotificationConfig
A container associating a push notification configuration with a specific task.
TaskQueryParams
Represents a request for the GetTask method.
TaskStatus
A container for the status of a task
TaskStatusUpdateEvent
An event sent by the agent to notify the client of a change in a task’s status.
TaskVersion
Monotonically increasing version counter for optimistic concurrency control.

Enums§

ApiKeyLocation
Where an API key is placed in the request.
AuthRejectionKind
Which of the two refusals spec §3.3.2 distinguishes.
ErrorCode
Numeric error codes defined by JSON-RPC 2.0 and the A2A v1.0 specification.
JsonRpcRequestId
A JSON-RPC 2.0 request identifier with three distinct states.
JsonRpcResponse
A JSON-RPC 2.0 response: either a success with a result or an error with an error object.
MessageRole
Defines the sender of a message in A2A protocol communication.
OAuthFlows
Defines the configuration for the supported OAuth 2.0 flows.
PartContent
The content of a Part, discriminated by JSON member name per v1.0 spec.
SecurityScheme
Defines a security scheme that can be used to secure an agent’s endpoints.
SendMessageResponse
Represents the response for the SendMessage method.
StreamResponse
A wrapper object used in streaming operations to encapsulate different types of response data.
TaskState
Defines the possible lifecycle states of a Task.

Constants§

A2A_CONTENT_TYPE
The registered A2A media type (spec §14.1.1).
A2A_EXTENSIONS_HEADER
HTTP header name for extension activation (spec §14.2.2).
A2A_VERSION
A2A protocol version string, in the Major.Minor wire form.
A2A_VERSION_HEADER
HTTP header name for the A2A protocol version.
JSON_CONTENT_TYPE
Content type emitted by the JSON-RPC binding, and by the HTTP+JSON binding to a client whose Accept prefers it or asks only for text/event-stream.
WEBSOCKET_BINDING_URI
This project’s identifier for its §12 WebSocket binding, as AgentInterface::protocol_binding.

Traits§

AcceptedFields
The JSON keys a request type accepts, in both protobuf spellings.

Functions§

deser_from_slice
Deserializes a value from a byte slice, first converting to &str to enable serde_json’s borrowed-data optimizations.
deser_from_str
Deserializes a value from a &str using serde_json’s borrowed-data path.
parse_iso8601_to_unix_millis
Parses an RFC 3339 date-time (spec §5.6.1: ISO 8601, which RFC 3339 profiles) into milliseconds since the Unix epoch.
unix_millis_to_iso8601
Formats Unix-epoch milliseconds as an ISO 8601 UTC string with millisecond precision (e.g. "2026-03-15T12:00:00.123Z").
utc_now_iso8601
Returns the current UTC time as an ISO 8601 string with millisecond precision (e.g. "2026-03-15T12:00:00.123Z").

Type Aliases§

A2aResult
Convenience type alias: Result<T, A2aError>.
AuthenticatedExtendedCardResponse
The full (private) agent card returned by agent/authenticatedExtendedCard.
JsonRpcId
A JSON-RPC 2.0 response identifier.
NamedSecuritySchemes
A map from security scheme name to its definition, as used in AgentCard.securitySchemes.