Expand description
Server framework for implementing A2A agents.
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.
- executor_
helpers - Ergonomic helpers for implementing
AgentExecutor. - handler
- Core request handler — protocol logic layer.
- interceptor
- Server-side interceptor chain.
- metrics
- Metrics hooks for observing handler activity.
- otel
- OpenTelemetry integration for the A2A server.
- push
- Push notification configuration storage and delivery.
- rate_
limit - Token-bucket rate limiter as a
ServerInterceptor. - request_
context - Request context passed to the
AgentExecutor. - serve
- Server startup helpers.
- store
- Task storage backend.
- streaming
- Streaming infrastructure for SSE responses and event queues.
- tenant_
config - Per-tenant configuration for multi-tenant A2A servers.
- tenant_
resolver - Tenant resolution for multi-tenant A2A servers.
Macros§
- agent_
executor - Generates an
AgentExecutorimplementation from a closure-like syntax.
Structs§
- A2aRouter
- Builder for an Axum
Routerthat serves all A2A v1.0 protocol methods. - Bearer
Token Tenant Resolver - Extracts a tenant ID from the
Authorization: Bearer <token>header. - Call
Context - Metadata about the current server-side method call.
- Connection
Pool Stats - Statistics about the HTTP connection pool.
- Cors
Config - CORS configuration for A2A dispatchers.
- Dispatch
Config - Configuration for dispatch-layer limits shared by both JSON-RPC and REST dispatchers.
- Dynamic
Agent Card Handler - Serves a dynamically generated
AgentCardas a JSON HTTP response. - Event
Emitter - Ergonomic helper for emitting status and artifact events from an executor.
- Event
Queue Manager - Manages event queues for active tasks.
- Grpc
Config - Configuration for the gRPC dispatcher.
- Grpc
Dispatcher - gRPC dispatcher that routes A2A requests to a
RequestHandler. - Handler
Limits - Configurable limits for the request handler.
- Header
Tenant Resolver - Extracts a tenant ID from a configurable HTTP header.
- HotReload
Agent Card Handler - An agent card handler that supports hot-reloading.
- Http
Push Sender - HTTP-based
PushSenderusing hyper. - InMemory
Push Config Store - In-memory
PushConfigStorebacked by aHashMap. - InMemory
Queue Reader - In-memory
EventQueueReaderbacked by abroadcastchannel receiver. - InMemory
Queue Writer - In-memory
EventQueueWriterbacked by abroadcastchannel sender. - InMemory
Task Store - In-memory
TaskStorebacked by aBTreeMapunder aRwLock. - Json
RpcDispatcher - JSON-RPC 2.0 request dispatcher.
- Migration
- A single schema migration.
- Migration
Runner - Runs schema migrations against a
SQLitedatabase. - Otel
Metrics - A
Metricsimplementation backed by OpenTelemetry instruments. - Path
Segment Tenant Resolver - Extracts a tenant ID from a URL path segment by index.
- PerTenant
Config - Per-tenant configuration for timeouts, capacity limits, and executor selection.
- PgMigration
- A single schema migration.
- PgMigration
Runner - Runs schema migrations against a
PostgreSQLdatabase. - Postgres
Push Config Store PostgreSQL-backedPushConfigStore.- Postgres
Task Store PostgreSQL-backedTaskStore.- Push
Retry Policy - Retry policy for push notification delivery.
- Rate
Limit Config - Configuration for
RateLimitInterceptor. - Rate
Limit Interceptor - A fixed-window rate limiting
ServerInterceptor. - Request
Context - Context for a single agent execution request.
- Request
Handler - The core protocol logic handler.
- Request
Handler Builder - Fluent builder for
RequestHandler. - Rest
Dispatcher - REST HTTP request dispatcher.
- Server
Interceptor Chain - An ordered chain of
ServerInterceptorinstances. - Sqlite
Push Config Store - SQLite-backed
PushConfigStore. - Sqlite
Task Store - SQLite-backed
TaskStore. - Static
Agent Card Handler - Serves a pre-serialized
AgentCardas a JSON HTTP response with caching. - Task
Store Config - Configuration for
InMemoryTaskStore. - Tenant
Aware InMemory Push Config Store - Tenant-isolated in-memory
PushConfigStore. - Tenant
Aware InMemory Task Store - Tenant-isolated in-memory
TaskStore. - Tenant
Aware Postgres Push Config Store - Tenant-scoped
PostgreSQL-backedPushConfigStore. - Tenant
Aware Postgres Task Store - Tenant-scoped
PostgreSQL-backedTaskStore. - Tenant
Aware Sqlite Push Config Store - Tenant-scoped SQLite-backed
PushConfigStore. - Tenant
Aware Sqlite Task Store - Tenant-scoped SQLite-backed
TaskStore. - Tenant
Context - Thread-safe tenant context for scoping store operations.
- Tenant
Limits - Resource limits and configuration for a single tenant.
- Tenant
Store Config - Configuration for
TenantAwareInMemoryTaskStore. - WebSocket
Dispatcher - WebSocket-based A2A dispatcher.
Enums§
- Send
Message Result - Result of
RequestHandler::on_send_message. - Server
Error - Server framework error type.
Constants§
- CORS_
ALLOW_ ALL - CORS
Access-Control-Allow-Originheader value for public agent cards.
Traits§
- Agent
Card Producer - Trait for producing an
AgentCarddynamically. - Agent
Executor - Trait for implementing A2A agent execution logic.
- Dispatcher
- Trait for types that can dispatch HTTP requests to an A2A handler.
- Event
Queue Reader - Trait for reading streaming events.
- Event
Queue Writer - Trait for writing streaming events.
- Metrics
- Trait for receiving metrics callbacks from the handler.
- Push
Config Store - Trait for storing push notification configurations.
- Push
Sender - Trait for delivering push notifications to client webhooks.
- Server
Interceptor - A server-side interceptor for request processing.
- Task
Store - Trait for persisting and retrieving
Taskobjects. - Tenant
Resolver - Trait for extracting a tenant identifier from incoming requests.
Functions§
- boxed_
future - Wraps an async expression into
Pin<Box<dyn Future<Output = T> + Send + 'a>>. - serve
- Starts an HTTP server that dispatches requests using the given dispatcher.
- serve_
with_ addr - Starts an HTTP server and returns the bound
SocketAddr.
Type Aliases§
- Server
Result - Convenience type alias:
Result<T, ServerError>.