Complete reference of all configuration options across a2a-rust crates.
Option Type Default Description
with_agent_cardAgentCardNone Discovery card for /.well-known/agent.json
with_task_storeimpl TaskStoreInMemoryTaskStoreCustom task storage backend
with_task_store_configTaskStoreConfigNo limits TTL and capacity for default store
with_push_config_storeimpl PushConfigStoreInMemoryPushConfigStoreCustom push config storage
with_push_senderimpl PushSenderNone Webhook delivery implementation
with_interceptorimpl ServerInterceptorEmpty chain Server middleware
with_executor_timeoutDurationNone Max time for executor completion
with_event_queue_capacityusize64 Bounded channel size per stream
with_max_event_sizeusize16 MiB Max serialized SSE event size
with_max_concurrent_streamsusizeUnbounded Limit concurrent SSE connections
with_event_queue_write_timeoutDuration5s Write timeout for event queue sends
with_metricsimpl MetricsNoopMetricsMetrics observer for handler activity
with_handler_limitsHandlerLimitsSee below Configurable validation limits
Field Type Default Description
max_id_lengthusize1,024 Maximum task/context ID length
max_metadata_sizeusize1 MiB Maximum serialized metadata size
max_cancellation_tokensusize10,000 Cleanup sweep threshold
max_token_ageDuration1 hour Stale token eviction age
push_delivery_timeoutDuration5s Per-webhook delivery timeout
Field Type Default Description
max_capacityOption<usize>10,000 Maximum stored tasks; oldest terminal tasks evicted on overflow
task_ttlOption<Duration>1 hour TTL for completed/failed tasks
eviction_intervalu6464 Writes between automatic eviction sweeps
max_page_sizeu321,000 Maximum tasks per page in list queries
Constructor Default Description
::new()100 Default max push configs per task
::with_max_configs_per_task(N)— Custom per-task push config limit
Shared configuration for both JSON-RPC and REST dispatchers. Pass to
JsonRpcDispatcher::with_config() or RestDispatcher::with_config().
Field Type Default Description
max_request_body_sizeusize4 MiB Larger bodies return 413
body_read_timeoutDuration30s Slow loris protection
max_query_string_lengthusize4,096 REST only; longer queries return 414
sse_keep_alive_intervalDuration30s Periodic keep-alive comment interval for SSE streams
sse_channel_capacityusize64 SSE response body channel buffer size
Configuration for the gRPC dispatcher (requires grpc feature).
Field Type Default Description
max_message_sizeusize4 MiB Maximum inbound/outbound message size
concurrency_limitusize256 Max concurrent gRPC requests per connection
stream_channel_capacityusize64 Bounded channel for streaming responses
Configurable retry policy for HttpPushSender. Pass via
HttpPushSender::with_retry_policy().
Field Type Default Description
max_attemptsusize3 Maximum delivery attempts
backoffVec<Duration>[1s, 2s]Backoff durations between retries
Field Type Default Description
requests_per_windowu64100 Max requests per caller per window
window_secsu6460 Window duration in seconds
Limit Value Description
Event queue type broadcastFan-out to multiple subscribers; slow readers skip missed events
Rate limiter cleanup interval 256 checks Stale buckets (from departed callers) evicted every 256 check() calls
Rate limiter window CAS Lock-free Window transitions use compare_exchange to avoid TOCTOU races
Credential store poisoning Fail-fast InMemoryCredentialsStore panics on poisoned locks rather than returning None
Option Type Default Description
with_protocol_binding&strAuto-detect Transport: "JSONRPC", "REST", or "GRPC"
with_timeoutDuration30s Per-request timeout
with_connection_timeoutDuration10s TCP connection timeout
with_stream_connect_timeoutDuration30s SSE connect timeout
with_retry_policyRetryPolicyNone Retry on transient errors
with_accepted_output_modesVec<String>["text/plain", "application/json"]MIME types accepted
with_history_lengthu32None Messages in responses
with_return_immediatelyboolfalse Don't wait for completion
with_interceptorimpl CallInterceptorEmpty chain Client middleware
Configuration for the gRPC client transport (requires grpc feature).
Field Type Default Description
timeoutDuration30s Per-request timeout
connect_timeoutDuration10s Connection timeout
max_message_sizeusize4 MiB Maximum message size
stream_channel_capacityusize64 Streaming response buffer
Field Type Default Description
max_retriesu323 Maximum retry attempts
initial_backoffDuration500ms Backoff before first retry
max_backoffDuration30s Caps exponential growth
backoff_multiplierf642.0 Multiplier per retry
Limit Value Description
Buffer cap 16 MiB Max buffered SSE data (aligned with server)
Connect timeout 30s (default) Initial connection timeout
Header Default Description
Cache-Controlpublic, max-age=60Configurable max-age
ETagAuto-computed Content hash
Last-ModifiedAuto-set Timestamp of last change
Feature Default Description
signingOff Agent card signing
tracingOff Structured logging via tracing crate
sqliteOff SQLite-backed task and push config stores via sqlx
websocketOff WebSocket transport via tokio-tungstenite
grpcOff gRPC transport via tonic
otelOff OpenTelemetry metrics via opentelemetry-otlp
Feature Default Description
signingOff Agent card signing verification
tracingOff Structured logging via tracing crate
tls-rustlsOff HTTPS via rustls (no OpenSSL dependency)
websocketOff WebSocket transport via tokio-tungstenite
grpcOff gRPC transport via tonic
Feature Default Description
signingOff JWS/ES256 agent card signing (RFC 8785 canonicalization)
Feature Default Description
signingOff Enables signing in all sub-crates
tracingOff Enables tracing in client and server
tls-rustlsOff Enables tls-rustls in client
grpcOff Enables grpc in client and server
otelOff Enables otel in the server
Variable Description
RUST_LOGLog level filter (when tracing feature is enabled)
Examples:
RUST_LOG=info # Info and above
RUST_LOG=debug # Debug and above
RUST_LOG=a2a_protocol_server=debug # Debug for server crate only
RUST_LOG=a2a_protocol_server=trace,a2a_protocol_client=debug # Per-crate levels