Module types

Module types 

Source
Expand description

Re-export A2A protocol types so downstream crates can ensure they use the exact same type definitions as the client.

Modules§

agent_card

Structs§

A2ARequest
Represents a complete A2A JSON-RPC request, wrapping the payload with common fields.
APIKeySecurityScheme
Defines a security scheme using an API key.
AgentCapabilities
Defines optional capabilities supported by an agent.
AgentCard
The AgentCard is a self-describing manifest for an agent.
AgentCardSignature
Represents a JWS signature of an AgentCard.
AgentExtension
A declaration of a protocol extension supported by an Agent.
AgentInterface
Declares a combination of a target URL and a transport protocol for interacting with the agent.
AgentProvider
Represents the service provider of an agent.
AgentSkill
Represents a distinct capability or function that an agent can perform.
Artifact
Represents a file, data structure, or other resource generated by an agent during a task.
AuthenticatedExtendedCardNotConfiguredError
An A2A-specific error indicating that the agent does not have an Authenticated Extended Card configured.
AuthorizationCodeOAuthFlow
Defines configuration details for the OAuth 2.0 Authorization Code flow.
CancelTaskSuccessResponse
Represents a successful JSON-RPC response for the tasks/cancel method.
ClientCredentialsOAuthFlow
Defines configuration details for the OAuth 2.0 Client Credentials flow.
ContentTypeNotSupportedError
An A2A-specific error indicating an incompatibility between the requested content types and the agent’s capabilities.
DeleteTaskPushNotificationConfigParams
Defines parameters for deleting a specific push notification configuration for a task.
DeleteTaskPushNotificationConfigSuccessResponse
Represents a successful JSON-RPC response for the tasks/pushNotificationConfig/delete method.
FileWithBytes
Represents a file with its content provided directly as a base64-encoded string.
FileWithUri
Represents a file with its content located at a specific URI.
GetAuthenticatedExtendedCardSuccessResponse
Represents a successful JSON-RPC response for the agent/getAuthenticatedExtendedCard method.
GetTaskPushNotificationConfigParamsWithId
Parameters for fetching a push notification configuration with a specific config ID.
GetTaskPushNotificationConfigSuccessResponse
Represents a successful JSON-RPC response for the tasks/pushNotificationConfig/get method.
GetTaskSuccessResponse
Represents a successful JSON-RPC response for the tasks/get method.
HTTPAuthSecurityScheme
Defines a security scheme using HTTP authentication.
ImplicitOAuthFlow
Defines configuration details for the OAuth 2.0 Implicit flow.
InternalError
An error indicating an internal error on the server.
InvalidAgentResponseError
An A2A-specific error indicating that the agent returned a response that does not conform to the specification for the current method.
InvalidParamsError
An error indicating that the method parameters are invalid.
InvalidRequestError
An error indicating that the JSON sent is not a valid Request object.
JSONParseError
An error indicating that the server received invalid JSON.
JSONRPCError
Represents a JSON-RPC 2.0 Error object, included in an error response.
JSONRPCErrorResponse
Represents a JSON-RPC 2.0 Error Response object.
JSONRPCMessage
Defines the base structure for any JSON-RPC 2.0 request, response, or notification.
JSONRPCRequest
Represents a JSON-RPC 2.0 Request object.
JSONRPCSuccessResponse
Represents a successful JSON-RPC 2.0 Response object.
ListTaskPushNotificationConfigParams
Defines parameters for listing all push notification configurations associated with a task.
ListTaskPushNotificationConfigSuccessResponse
Represents a successful JSON-RPC response for the tasks/pushNotificationConfig/list method.
Message
Represents a single message in the conversation between a user and an agent.
MessageSendConfiguration
Defines configuration options for a message/send or message/stream request.
MessageSendParams
Defines the parameters for a request to send a message to an agent.
MethodNotFoundError
An error indicating that the requested method does not exist or is not available.
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.
PasswordOAuthFlow
Defines configuration details for the OAuth 2.0 Resource Owner Password flow.
PushNotificationAuthenticationInfo
Defines authentication details for a push notification endpoint.
PushNotificationConfig
Defines the configuration for setting up push notifications for task updates.
PushNotificationNotSupportedError
An A2A-specific error indicating that the agent does not support push notifications.
SendMessageSuccessResponse
Represents a successful JSON-RPC response for the message/send method.
SendStreamingMessageSuccessResponse
Represents a successful JSON-RPC response for the message/stream method.
SetTaskPushNotificationConfigSuccessResponse
Represents a successful JSON-RPC response for the tasks/pushNotificationConfig/set method.
Task
Represents a single, stateful operation or conversation between a client and an agent.
TaskArtifactUpdateEvent
An event sent by the agent to notify the client that an artifact has been generated or updated.
TaskIdParams
Defines parameters containing a task ID, used for simple task operations.
TaskNotCancelableError
An A2A-specific error indicating that the task is in a state where it cannot be canceled.
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.
TaskQueryParams
Defines parameters for querying a task, with an option to limit history length.
TaskStatus
Represents the status of a task at a specific point in time.
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 by the agent.

Enums§

A2AError
A discriminated union of all standard JSON-RPC and A2A-specific error types.
A2ARequestPayload
A discriminated union of all possible A2A request payloads, tagged by the method field.
APIKeyLocation
The location of an API key.
AgentResponse
Main agent response type that can be either a Task or Message.
CancelTaskResponse
Represents a JSON-RPC response for the tasks/cancel method.
DeleteTaskPushNotificationConfigResponse
Represents a JSON-RPC response for the tasks/pushNotificationConfig/delete method.
FileContent
Represents file content, which can be provided either directly as bytes or as a URI.
GetAuthenticatedExtendedCardResponse
Represents a JSON-RPC response for the agent/getAuthenticatedExtendedCard method.
GetTaskPushNotificationConfigParams
Defines parameters for fetching a specific push notification configuration for a task.
GetTaskPushNotificationConfigResponse
Represents a JSON-RPC response for the tasks/pushNotificationConfig/get method.
GetTaskResponse
Represents a JSON-RPC response for the tasks/get method.
JSONRPCId
Represents a JSON-RPC 2.0 identifier, which can be a string, number, or null.
JSONRPCResponse
A discriminated union representing all possible JSON-RPC 2.0 responses for the A2A specification methods.
ListTaskPushNotificationConfigResponse
Represents a JSON-RPC response for the tasks/pushNotificationConfig/list method.
MessageRole
Identifies the sender of a message.
Part
A discriminated union representing a part of a message or artifact.
SecurityScheme
Defines a security scheme that can be used to secure an agent’s endpoints.
SendMessageResponse
Represents a JSON-RPC response for the message/send method.
SendMessageResult
The result of a message/send call, which can be a direct reply or a task object.
SendStreamingMessageResponse
Represents a JSON-RPC response for the message/stream method.
SendStreamingMessageResult
The result of a message/stream call, which can be an initial object or a streaming event.
SetTaskPushNotificationConfigResponse
Represents a JSON-RPC response for the tasks/pushNotificationConfig/set method.
TaskState
Defines the lifecycle states of a Task.
TransportProtocol
Supported A2A transport protocols.

Constants§

API_KEY_TYPE
ARTIFACT_UPDATE_KIND
HTTP_TYPE
MESSAGE_KIND
MUTUAL_TLS_TYPE
OAUTH2_TYPE
OPENID_TYPE
PROTOCOL_VERSION
STATUS_UPDATE_KIND
TASK_KIND