Expand description
A2A protocol v1.0 — server framework.
Provides RequestHandler and AgentExecutor for implementing A2A
agents over HTTP/1.1 and HTTP/2 using hyper 1.x.
§Quick start
- Implement
AgentExecutorwith your agent logic. - Build a
RequestHandlerviaRequestHandlerBuilder. - Wire
JsonRpcDispatcherorRestDispatcherinto your hyper server.
§Module overview
| Module | Contents |
|---|---|
error | ServerError, ServerResult |
executor | AgentExecutor trait |
handler | RequestHandler, SendMessageResult |
builder | RequestHandlerBuilder |
store | TaskStore, InMemoryTaskStore |
streaming | Event queues, SSE response builder |
push | Push config store, push sender |
agent_card | Static/dynamic agent card handlers |
dispatch | JsonRpcDispatcher, RestDispatcher |
interceptor | ServerInterceptor, ServerInterceptorChain |
request_context | RequestContext |
call_context | CallContext |
§Transport limitations
The A2A specification lists gRPC as an optional transport binding. This implementation currently supports HTTP + SSE only; gRPC transport is not yet implemented.
§Rate limiting
This library does not perform request rate limiting. Deployments that require rate limiting should handle it in a reverse proxy (e.g. nginx, Envoy) or a middleware layer in front of the A2A handler.
Re-exports§
pub use agent_card::AgentCardProducer;pub use agent_card::DynamicAgentCardHandler;pub use agent_card::StaticAgentCardHandler;pub use agent_card::CORS_ALLOW_ALL;pub use builder::RequestHandlerBuilder;pub use call_context::CallContext;pub use dispatch::CorsConfig;pub use dispatch::JsonRpcDispatcher;pub use dispatch::RestDispatcher;pub use error::ServerError;pub use error::ServerResult;pub use executor::AgentExecutor;pub use handler::RequestHandler;pub use handler::SendMessageResult;pub use interceptor::ServerInterceptor;pub use interceptor::ServerInterceptorChain;pub use push::HttpPushSender;pub use push::InMemoryPushConfigStore;pub use push::PushConfigStore;pub use push::PushSender;pub use request_context::RequestContext;pub use store::InMemoryTaskStore;pub use store::TaskStore;pub use store::TaskStoreConfig;pub use streaming::EventQueueManager;pub use streaming::EventQueueReader;pub use streaming::EventQueueWriter;pub use streaming::InMemoryQueueReader;pub use streaming::InMemoryQueueWriter;
Modules§
- agent_
card - Agent card HTTP handlers (static, dynamic, and caching utilities).
- builder
- Builder for
RequestHandler. - call_
context - Call context for server-side interceptors.
- dispatch
- HTTP dispatch layer — JSON-RPC and REST routing.
- error
- Server-specific error types.
- executor
- Agent executor trait.
- handler
- Core request handler — protocol logic layer.
- interceptor
- Server-side interceptor chain.
- metrics
- Metrics hooks for observing handler activity.
- push
- Push notification configuration storage and delivery.
- request_
context - Request context passed to the
AgentExecutor. - store
- Task storage backend.
- streaming
- Streaming infrastructure for SSE responses and event queues.