a2a library

Classes

A2AAgent
Agent class
A2AAgentCapabilities
Defines optional capabilities supported by an agent.
A2AAgentCard
An AgentCard conveys key information:
A2AAgentCardSignature
AgentCardSignature represents a JWS signature of an AgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
A2AAgentExecutor
A2AAgentExtension
A declaration of an extension supported by an Agent.
A2AAgentInterface
Declares a combination of a target URL and a transport protocol for interacting with the agent. This allows agents to expose the same functionality over multiple transport mechanisms.
A2AAgentProvider
The service provider of the agent
A2AAgentSkill
Represents a unit of capability that an agent can perform.
A2AAPIKeySecurityScheme
API Key security scheme.
A2AArtifact
Represents a file, data structure, or other resource generated by an agent during a task.
A2AAuthenticatedExtendedCardNotConfiguredError
JSON-RPC error indicating no authenticated agen card has been configured.
A2AAuthenticationHandler
Generic interface for handling authentication for HTTP requests.
A2AAuthorizationCodeOAuthFlow
Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
A2ACancelTaskRequest
JSON-RPC request model for the 'tasks/cancel' method.
A2ACancelTaskResponse
JSON-RPC response for the 'tasks/cancel' method.
A2ACancelTaskSuccessResponse
JSON-RPC success response model for the 'tasks/cancel' method.
A2AClient
A2AClient is a HTTP client for interacting with A2A-compliant agents.
A2AClientCredentialsOAuthFlow
Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0
A2AConstants
Shared constants for the A2A library
A2AContentTypeNotSupportedError
JSON-RPC error indicating invalid JSON was received by the server.
A2ADataPart
Represents a structured data segment (e.g., JSON) within a message or artifact.
A2ADecodedParts
Holds parts as decoded by [
A2ADefaultExecutionEventBus
A2ADefaultExecutionEventBusManager
A2ADefaultRequestHandler
A2ADeleteTaskPushNotificationConfigParams
The parameters identifying the push notification configuration to delete.
A2ADeleteTaskPushNotificationConfigRequest
Represents a JSON-RPC request for the tasks/pushNotificationConfig/delete method.
A2ADeleteTaskPushNotificationConfigResponse
JSON-RPC response for the 'tasks/pushNotificationConfig/delete' method.
A2ADeleteTaskPushNotificationConfigSuccessResponse
JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
A2AError
A2A supported error types
A2AExecutionEventBus
A2AExecutionEventBusManager
A2AExecutionEventQueue
An async queue that subscribes to an ExecutionEventBus for events and provides an async generator to consume them.
A2AExecutorConstructor
Simplifies the construction of executors
A2AExpressApp
A2AFilePart
Represents a file segment within a message or artifact. The file content can be provided either directly as bytes or as a URI.
A2AFilePartVariant
File type variants
A2AFileWithBytes
Represents a file with its content provided directly as a base64-encoded string
A2AFileWithUri
Represents a file with its content located at a specific URI.
A2AGetTaskPushNotificationConfigParams
Defines parameters for fetching a specific push notification configuration for a task.
A2AGetTaskPushNotificationConfigRequest
JSON-RPC request model for the 'tasks/pushNotificationConfig/get' method.
A2AGetTaskPushNotificationConfigResponse
JSON-RPC response for the 'tasks/pushNotificationConfig/get' method.
A2AGetTaskPushNotificationConfigSuccessResponse
JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.
A2AGetTaskRequest
JSON-RPC request model for the 'tasks/get' method.
A2AGetTaskResponse
JSON-RPC response for the 'tasks/get' method.
A2AGetTaskSuccessResponse
JSON-RPC success response for the 'tasks/get' method.
A2AHTTPAuthSecurityScheme
HTTP Authentication security scheme.
A2AImplicitOAuthFlow
Configuration for the OAuth Implicit flow
A2AInMemoryTaskStore
In memory task store
A2AInternalError
JSON-RPC error indicating invalid JSON was received by the server.
A2AInvalidAgentResponseError
JSON-RPC error indicating invalid JSON was received by the server.
A2AInvalidParamsError
JSON-RPC error indicating invalid JSON was received by the server.
A2AInvalidRequestError
JSON-RPC error indicating invalid JSON was received by the server.
A2AJSONParseError
JSON-RPC error indicating invalid JSON was received by the server.
A2AJSONRPCError
Represents a JSON-RPC 2.0 Error object.
A2AJSONRPCErrorResponse
JSON-RPC response for the 'tasks/cancel' method.
A2AJSONRPCErrorResponseDTPR
/// JSON RPC error response object
A2AJSONRPCErrorResponseGTPR
Represents a JSON-RPC 2.0 Error Response object.
A2AJSONRPCErrorResponseLTPR
Represents a JSON-RPC 2.0 Error Response object.
A2AJSONRPCErrorResponsePNCR
RPC error PN configuration
A2AJSONRPCErrorResponseS
RPC error send
A2AJSONRPCErrorResponseSS
RPC error send stream
A2AJSONRPCErrorResponseSSM
JSON RPC error response object
A2AJSONRPCErrorResponseSTPR
/// JSON RPC error response object
A2AJSONRPCErrorResponseT
Represents a JSON-RPC 2.0 Error Response object.
A2AJsonRpcRequest
Represents a JSON-RPC 2.0 Request object.
A2AJsonRpcResponse
Represents a JSON-RPC 2.0 Response object.
A2AJsonRpcTransportHandler
Handles JSON-RPC transport layer, routing requests to an A2ARequestHandler.
A2AListTaskPushNotificationConfigParams
The parameters identifying the task whose configurations are to be listed.
A2AListTaskPushNotificationConfigRequest
Represents a JSON-RPC request for the tasks/pushNotificationConfig/list method.
A2AListTaskPushNotificationConfigResponse
JSON-RPC response for the 'tasks/pushNotificationConfig/list' method.
A2AListTaskPushNotificationConfigSuccessResponse
JSON-RPC success response model for the 'tasks/pushNotificationConfig/list' method.
A2AMCPBridge
The A2A MCP Bridge.
A2AMCPServer
Provides an MCP server with a set of predefined tools for use by the A2AMCPBridge class.
A2AMessage
Represents a single message in the conversation between a user and an agent
A2AMessageSendConfiguration
Defines configuration options for a message/send or message/stream request.
A2AMessageSendParams
Defines the parameters for a request to send a message to an agent. This can be used to create a new task, continue an existing one, or restart a task.
A2AMethodNotFoundError
JSON-RPC error indicating invalid JSON was received by the server.
A2AOAuth2SecurityScheme
OAuth2.0 security scheme configuration.
A2AOAuthFlows
An object containing configuration information for the flow types supported.
A2AOpenIdConnectSecurityScheme
OpenID Connect security scheme configuration.
A2APart
A discriminated union representing a part of a message or artifact, which can be text, a file, or structured data.
A2APasswordOAuthFlow
Configuration for the OAuth Resource Owner Password flow
A2APushNotificationAuthenticationInfo
Defines authentication details for a push notification endpoint.
A2APushNotificationConfig
Defines the configuration for setting up push notifications for task updates.
A2APushNotificationNotSupportedError
JSON-RPC error indicating invalid JSON was received by the server.
A2ARequest
A2A supported request types
A2ARequestContext
A2ARequestHandler
A2AResultManager
A2AResultResolver
Use to pass success or fail values back to the caller of a function. Only one value should be set.
A2ASecurityScheme
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.0 Security Scheme Object.
A2ASendMessageRequest
JSON-RPC request model for the 'message/send' method.
A2ASendMessageResponse
JSON-RPC response model for the 'message/send' method.
A2ASendMessageSuccessResponse
JSON-RPC success response model for the 'message/send' method.
A2ASendStreamingMessageRequest
JSON-RPC request model for the 'message/stream' method.
A2ASendStreamingMessageResponse
JSON-RPC response model for the 'message/stream' method.
A2ASendStreamingMessageSuccessResponse
JSON-RPC success response model for the 'message/stream' method.
A2ASendStreamMessageResponse
JSON-RPC response model for the 'message/send' method.
A2ASendStreamMessageSuccessResponse
JSON-RPC success response model for the 'message/stream' method. This response is also used to carry streaming responses from the server(SSE) in its result parameter.
A2AServerDebug
A2A Server debug support class
A2AServerError
Custom error class for A2A server operations, incorporating JSON-RPC error codes.
A2ASetTaskPushNotificationConfigRequest
JSON-RPC request model for the 'tasks/pushNotificationConfig/set' method.
A2ASetTaskPushNotificationConfigResponse
JSON-RPC response for the 'tasks/pushNotificationConfig/set' method.
A2ASetTaskPushNotificationConfigSuccessResponse
JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
A2ASetTaskPushNotificationConfigSuccessResponseSTPR
JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
A2ATask
Represents a single, stateful operation or conversation between a client and an agent.
A2ATaskArtifactUpdateEvent
An event sent by the agent to notify the client that an artifact has been generated or updated. This is typically used in streaming models.
A2ATaskIdParams
A Structured value that holds the parameter values to be used during the invocation of the method.
A2ATaskNotCancelableError
JSON-RPC error indicating invalid JSON was received by the server.
A2ATaskNotFoundError
JSON-RPC error indicating invalid JSON was received by the server.
A2ATaskPushNotificationConfig
A container associating a push notification configuration with a specific task.
A2ATaskQueryParams
A Structured value that holds the parameter values to be used during the invocation of the method.
A2ATaskResubscriptionRequest
JSON-RPC request model for the 'tasks/resubscribe' method.
A2ATaskStatus
Represents the status of a task at a specific point in time.
A2ATaskStatusUpdateEvent
An event sent by the agent to notify the client of a change in a task's status. This is typically used in streaming or subscription models.
A2ATaskStore
Simplified interface for task storage providers. Stores and retrieves the task.
A2ATextPart
Represents a text segment within a message or artifact.
A2AType
A2AUnsupportedOperationError
JSON-RPC error indicating invalid JSON was received by the server.
A2AUtilities
Server utilities class
Darto
DartoHeader
DartoMailer
DartoTransporter
Logger
Request
Response
Route
Router
SetTaskPushNotificationConfigResponse
JSON-RPC response model for the 'tasks/pushNotificationConfig/set' method.
Upload
WebSocketBroadcast
WebSocketServer

Enums

A2ATaskState
Represents the possible lifecycle states of a Task.
A2ATransportProtocol
Supported A2A transport protocols.

Mixins

A2AJSONRPCErrorResponseM
Common JSON error response mixin

Constants

ACCEPTED → const int
ALREADY_REPORTED → const int
BAD_GATEWAY → const int
BAD_REQUEST → const int
BANDWIDTH_LIMIT_EXCEEDED → const int
CHECKPOINT → const int
CONFLICT → const int
CONTINUE → const int
CREATED → const int
EARLY_HINTS → const int
EXPECTATION_FAILED → const int
FAILED_DEPENDENCY → const int
finalStates → const List<A2ATaskState>
FORBIDDEN → const int
FOUND → const int
GATEWAY_TIMEOUT → const int
GONE → const int
HTTP_VERSION_NOT_SUPPORTED → const int
I_AM_A_TEAPOT → const int
IM_USED → const int
INSUFFICIENT_STORAGE → const int
INTERNAL_SERVER_ERROR → const int
LENGTH_REQUIRED → const int
LOCKED → const int
LOOP_DETECTED → const int
METHOD_NOT_ALLOWED → const int
MOVED_PERMANENTLY → const int
MOVED_TEMPORARILY → const int
MULTI_STATUS → const int
MULTIPLE_CHOICES → const int
NETWORK_AUTHENTICATION_REQUIRED → const int
NO_CONTENT → const int
NON_AUTHORITATIVE_INFORMATION → const int
nonCancelableStates → const List<A2ATaskState>
NOT_ACCEPTABLE → const int
NOT_EXTENDED → const int
NOT_FOUND → const int
NOT_IMPLEMENTED → const int
NOT_MODIFIED → const int
OK → const int
PARTIAL_CONTENT → const int
PAYLOAD_TOO_LARGE → const int
PAYMENT_REQUIRED → const int
PERMANENT_REDIRECT → const int
PRECONDITION_FAILED → const int
PRECONDITION_REQUIRED → const int
PROCESSING → const int
PROXY_AUTHENTICATION_REQUIRED → const int
REQUEST_ENTITY_TOO_LARGE → const int
REQUEST_HEADER_FIELDS_TOO_LARGE → const int
REQUEST_TIMEOUT → const int
REQUEST_URI_TOO_LONG → const int
REQUESTED_RANGE_NOT_SATISFIABLE → const int
RESET_CONTENT → const int
SEE_OTHER → const int
SERVICE_UNAVAILABLE → const int
supportedTypes → const List<Type>
Supported request types
SWITCHING_PROTOCOLS → const int
TEMPORARY_REDIRECT → const int
terminalStates → const List<A2ATaskState>
TOO_EARLY → const int
TOO_MANY_REQUESTS → const int
UNAUTHORIZED → const int
UNPROCESSABLE_ENTITY → const int
UNSUPPORTED_MEDIA_TYPE → const int
UPGRADE_REQUIRED → const int
URI_TOO_LONG → const int
USE_PROXY → const int
VARIANT_ALSO_NEGOTIATES → const int

Typedefs

A2AAgentExecutionEvent = Object
Agent Execution Event
A2AId = Object
The ID type, String or num.
A2AResponseOrGenerator = Object
Transport handler response or async* function.
A2AResult = Object
Result type
A2ASV = Map<String, dynamic>
Structured value type
A2ATaskOrMessage = Object
DartoRouteBuilder = void Function(Darto app)
Err = Exception
ErrorHandler = void Function(Exception err, Request req, Response res, void ([Exception error]))
Handler = void
Middleware = dynamic Function(Request req, Response res, NextFunction next)
NextFunction = void Function([Exception error])
ParamMiddleware = void Function(Request req, Response res, NextFunction next, String value)
RenderLayout = FutureOr<Response> Function(String content)
RouteHandler = dynamic Function(Request req, Response res)
RouterRouteBuilder = void Function(Router router)
WebSocketMiddleware = FutureOr<bool> Function(HttpRequest request)