Skip to main content

Crate a2a_types

Crate a2a_types 

Source
Expand description

§A2A (Agent2Agent) Protocol Types

This crate provides the Rust data structures for the Agent2Agent (A2A) protocol, generated from the canonical proto/a2a.proto definition via prost + pbjson.

All types are available directly as a2a_types::Foo.

Modules§

o_auth_flows
Nested message and enum types in OAuthFlows.
part
Nested message and enum types in Part.
security_scheme
Nested message and enum types in SecurityScheme.
send_message_response
Nested message and enum types in SendMessageResponse.
stream_response
Nested message and enum types in StreamResponse.

Structs§

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. Next ID: 20
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.
AuthenticationInfo
Defines authentication details, used for push notifications.
AuthorizationCodeOAuthFlow
Defines configuration details for the OAuth 2.0 Authorization Code flow.
CancelTaskRequest
Represents a request for the CancelTask method.
ClientCredentialsOAuthFlow
Defines configuration details for the OAuth 2.0 Client Credentials flow.
DeleteTaskPushNotificationConfigRequest
Represents a request for the DeleteTaskPushNotificationConfig method.
DeviceCodeOAuthFlow
Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628). This flow is designed for input-constrained devices such as IoT devices, and CLI tools where the user authenticates on a separate device.
GetExtendedAgentCardRequest
Represents a request for the GetExtendedAgentCard method.
GetTaskPushNotificationConfigRequest
Represents a request for the GetTaskPushNotificationConfig method.
GetTaskRequest
Represents a request for the GetTask method.
HttpAuthSecurityScheme
Defines a security scheme using HTTP authentication.
ImplicitOAuthFlow
Deprecated: Use Authorization Code + PKCE instead.
InternalError
An error indicating an internal error on the server.
InvalidParamsError
An error indicating that the method parameters are invalid.
InvalidRequestError
An error indicating that the JSON sent is not a valid Request object.
JSONRPCError
Represents a JSON-RPC 2.0 Error object, included in an error response.
JSONRPCErrorResponse
Represents a JSON-RPC 2.0 Error Response object.
ListTaskPushNotificationConfigsRequest
Represents a request for the ListTaskPushNotificationConfigs method.
ListTaskPushNotificationConfigsResponse
Represents a successful response for the ListTaskPushNotificationConfigs method.
ListTasksRequest
Parameters for listing tasks with optional filtering criteria.
ListTasksResponse
Result object for ListTasks method containing an array of tasks and pagination information.
Message
Message is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, context_id must be provided, and task_id only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the context_id has to be the one that is set on the task). If only task_id is provided, the server will infer context_id from it.
MutualTlsSecurityScheme
Defines a security scheme using mTLS authentication.
OAuth2SecurityScheme
Defines a security scheme using OAuth 2.0.
OAuthFlows
Defines the configuration for the supported OAuth 2.0 flows.
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.
SecurityScheme
Defines a security scheme that can be used to secure an agent’s endpoints. This is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object. See: https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object
SendMessageConfiguration
Configuration of a send message request.
SendMessageRequest
Represents a request for the SendMessage method.
SendMessageResponse
Represents the response for the SendMessage method.
StreamResponse
A wrapper object used in streaming operations to encapsulate different types of response data.
StringList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED A list of strings.
SubscribeToTaskRequest
Represents a request for the SubscribeToTask method.
Task
Task is the core unit of action for A2A. It has a current status and when results are created for the task they are stored in the artifact. If there are multiple turns for a task, these are stored in history.
TaskArtifactUpdateEvent
A task delta where an artifact has been generated.
TaskNotFoundError
An A2A-specific error indicating that the requested task ID was not found.
TaskPushNotificationConfig
A container associating a push notification configuration with a specific task.
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.
UnsupportedOperationError
An A2A-specific error indicating that the requested operation is not supported.

Enums§

JSONRPCId
Represents a JSON-RPC 2.0 identifier, which can be a string, number, or null.
Role
Defines the sender of a message in A2A protocol communication.
TaskState
Defines the possible lifecycle states of a Task.