docs.rs failed to build a2a-protocol-server-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
a2a-protocol-server-0.2.0
a2a-protocol-server
Server framework for the A2A protocol v1.0 -- build, serve, and scale AI agents.
Overview
- Complete server framework for building A2A-compliant agents
- Built on hyper 1.x with tokio async runtime
- Pluggable dispatchers: JSON-RPC 2.0, REST, WebSocket, gRPC, Axum
- Pluggable storage: in-memory, SQLite, PostgreSQL
- SSE streaming for real-time task updates
- Multi-tenancy, rate limiting, interceptors, push notifications
Quick Start
use Arc;
use *; // via a2a-protocol-sdk
;
agent_executor!;
let handler = new;
serve.await?;
Architecture
┌─────────────────────────────────────────────────┐
│ Dispatchers │
│ JsonRpcDispatcher · RestDispatcher · A2aRouter │
│ WebSocketDispatcher · GrpcDispatcher │
├─────────────────────────────────────────────────┤
│ RequestHandler │
│ Interceptors · Rate Limiting · Multi-tenancy │
├─────────────────────────────────────────────────┤
│ AgentExecutor (your code) │
│ EventEmitter · EventQueueWriter │
├─────────────────────────────────────────────────┤
│ Storage Layer │
│ TaskStore · PushConfigStore · EventQueueManager │
│ InMemory · SQLite · PostgreSQL │
└─────────────────────────────────────────────────┘
Key Types
| Type | Purpose |
|---|---|
AgentExecutor |
Trait -- implement your agent logic |
RequestHandler |
Protocol orchestrator (task lifecycle, events, push) |
RequestHandlerBuilder |
Fluent builder with stores, interceptors, card |
EventEmitter |
Helper for emitting status/artifact events |
JsonRpcDispatcher |
JSON-RPC 2.0 transport |
RestDispatcher |
REST transport |
A2aRouter |
Axum framework integration (feature-gated) |
TaskStore |
Trait -- pluggable task persistence |
InMemoryTaskStore |
Default in-memory store |
ServerInterceptor |
Trait -- before/after middleware hooks |
RateLimitInterceptor |
Fixed-window per-caller rate limiting |
serve() |
One-liner HTTP server startup |
Features
| Feature | Purpose |
|---|---|
signing |
Agent card signing verification |
tracing |
Structured logging via tracing crate |
sqlite |
SQLite-backed task and push config stores |
postgres |
PostgreSQL-backed stores |
websocket |
WebSocket transport |
grpc |
gRPC transport via tonic |
otel |
OpenTelemetry OTLP metrics export |
axum |
Axum framework integration |
Agent Cards
Three serving strategies:
StaticAgentCardHandler-- fixed agent cardDynamicAgentCardHandler-- dynamically generatedHotReloadAgentCardHandler-- auto-reload from file (SIGHUP or polling)
HTTP caching with ETag, Last-Modified, 304 Not Modified.
Storage
Pluggable via TaskStore and PushConfigStore traits:
| Store | Feature | Use Case |
|---|---|---|
InMemoryTaskStore |
(default) | Development, testing, single-instance |
SqliteTaskStore |
sqlite |
Single-node production, edge |
PostgresTaskStore |
postgres |
Multi-node production |
All stores have tenant-aware variants for multi-tenancy.
Multi-Tenancy
Tenant resolution strategies:
HeaderTenantResolver-- from HTTP headerBearerTokenTenantResolver-- from bearer tokenPathSegmentTenantResolver-- from URL path
Per-tenant configuration with TenantLimits.
Observability
Metricstrait for custom metrics callbacksOtelMetrics(feature:otel) for native OTLP exporttracingintegration (feature:tracing)
License
Apache-2.0