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.
- audit
audit - 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
matchon (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
matchon. - 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.
- proto
proto - 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.protothat 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.
- signing
signing - 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
traceparentandtracestateheaders.
Structs§
- A2aError
- The canonical error type for A2A protocol operations.
- Agent
Capabilities - Defines optional capabilities supported by an agent.
- Agent
Card - A self-describing manifest for an agent. It provides essential metadata including the agent’s identity, capabilities, skills, supported communication methods, and security requirements.
- Agent
Card Signature AgentCardSignaturerepresents a JWS signature of anAgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).- Agent
Extension - A declaration of a protocol extension supported by an Agent.
- Agent
Interface - 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.
- Agent
Provider - Represents the service provider of an agent.
- Agent
Skill - Represents a distinct capability or function that an agent can perform.
- ApiKey
Security Scheme - Defines a security scheme using an API key.
- Artifact
- Artifacts represent task outputs.
- Artifact
Id - Opaque unique identifier for an
Artifact. - Auth
Rejection - A refused credential, as carried by
A2aError::auth_rejection. - Authentication
Info - Defines authentication details, used for push notifications.
- Authorization
Code Flow - Defines configuration details for the OAuth 2.0 Authorization Code flow.
- Cancel
Task Params - Represents a request for the
CancelTaskmethod. - Client
Credentials Flow - Defines configuration details for the OAuth 2.0 Client Credentials flow.
- Context
Id - Opaque unique identifier for a conversation context.
- Delete
Push Config Params - Represents a request for the
DeleteTaskPushNotificationConfigmethod. - Device
Code Flow - Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628).
- File
Content - Content of a file part.
- GetExtended
Agent Card Params - Represents a request for the
GetExtendedAgentCardmethod. - GetPush
Config Params - Represents a request for the
GetTaskPushNotificationConfigmethod. - Http
Auth Security Scheme - Defines a security scheme using HTTP authentication.
- Implicit
Flow - Deprecated: Use Authorization Code + PKCE instead.
- Json
RpcError - The error object within a JSON-RPC 2.0 error response.
- Json
RpcError Response - An error JSON-RPC 2.0 response.
- Json
RpcRequest - A JSON-RPC 2.0 request object.
- Json
RpcSuccess Response - A successful JSON-RPC 2.0 response.
- Json
RpcVersion - The JSON-RPC protocol version marker.
- List
Push Configs Params - Represents a request for the
ListTaskPushNotificationConfigsmethod. - List
Push Configs Response - Represents a successful response for the
ListTaskPushNotificationConfigsmethod. - List
Tasks Params - Parameters for listing tasks with optional filtering criteria.
- Message
Messageis one unit of communication between client and server.- Message
Id - Opaque unique identifier for a
Message. - Message
Send Params - Represents a request for the
SendMessagemethod. - Mutual
TlsSecurity Scheme - Defines a security scheme using
mTLSauthentication. - OAuth2
Security Scheme - Defines a security scheme using OAuth 2.0.
- Open
IdConnect Security Scheme - Defines a security scheme using
OpenIDConnect. - Part
Partrepresents 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).- PasswordO
Auth Flow - Deprecated: Use Authorization Code + PKCE or Device Code.
- Security
Requirement - Defines the security requirements for an agent.
- Send
Message Configuration - Configuration of a send message request.
- SerBuffer
- Thread-local reusable serialization buffer.
- String
List - A list of strings.
- Task
Taskis the core unit of action for A2A.- Task
Artifact Update Event - A task delta where an artifact has been generated.
- TaskId
- Opaque unique identifier for a
Task. - Task
IdParams - Represents a request for the
SubscribeToTaskmethod. - Task
List Response - Result object for
ListTasksmethod containing an array of tasks and pagination information. - Task
Push Notification Config - A container associating a push notification configuration with a specific task.
- Task
Query Params - Represents a request for the
GetTaskmethod. - Task
Status - A container for the status of a task
- Task
Status Update Event - An event sent by the agent to notify the client of a change in a task’s status.
- Task
Version - Monotonically increasing version counter for optimistic concurrency control.
Enums§
- ApiKey
Location - Where an API key is placed in the request.
- Auth
Rejection Kind - Which of the two refusals spec §3.3.2 distinguishes.
- Error
Code - Numeric error codes defined by JSON-RPC 2.0 and the A2A v1.0 specification.
- Json
RpcRequest Id - A JSON-RPC 2.0 request identifier with three distinct states.
- Json
RpcResponse - A JSON-RPC 2.0 response: either a success with a
resultor an error with anerrorobject. - Message
Role - Defines the sender of a message in A2A protocol communication.
- OAuth
Flows - Defines the configuration for the supported OAuth 2.0 flows.
- Part
Content - The content of a
Part, discriminated by JSON member name per v1.0 spec. - Security
Scheme - Defines a security scheme that can be used to secure an agent’s endpoints.
- Send
Message Response - Represents the response for the
SendMessagemethod. - Stream
Response - A wrapper object used in streaming operations to encapsulate different types of response data.
- Task
State - 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.Minorwire 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
Acceptprefers it or asks only fortext/event-stream. - WEBSOCKET_
BINDING_ URI - This project’s identifier for its §12 WebSocket binding, as
AgentInterface::protocol_binding.
Traits§
- Accepted
Fields - 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
&strto enableserde_json’s borrowed-data optimizations. - deser_
from_ str - Deserializes a value from a
&strusingserde_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>. - Authenticated
Extended Card Response - The full (private) agent card returned by
agent/authenticatedExtendedCard. - Json
RpcId - A JSON-RPC 2.0 response identifier.
- Named
Security Schemes - A map from security scheme name to its definition, as used in
AgentCard.securitySchemes.