docs.rs failed to build a2a-protocol-client-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-client-0.3.1
a2a-protocol-client
HTTP client for the A2A protocol v1.0 -- async, hyper-backed, with pluggable transports.
Overview
- Full-featured async HTTP client for communicating with any A2A-compliant agent
- Built on hyper 1.x with tokio
- Pluggable transport bindings: JSON-RPC 2.0 (default), REST, WebSocket, gRPC
- Interceptor chain for auth, logging, custom middleware
- Automatic retry with jittered exponential backoff
- SSE streaming for real-time events
Quick Start
use ClientBuilder;
use MessageSendParams;
let client = new.build?;
let response = client.send_message.await?;
Key Types
| Type | Purpose |
|---|---|
A2aClient |
Main entry point -- all A2A methods |
ClientBuilder |
Fluent builder for client construction |
EventStream |
Async iterator over SSE streaming events |
RetryPolicy |
Configurable jittered exponential backoff |
CallInterceptor |
Trait for request/response middleware |
AuthInterceptor |
Built-in auth header injection |
ClientError |
Rich error type with 10 variants |
A2A Methods
All 11 A2A v1.0 methods are supported:
send_message()/stream_message()-- Send and stream responsesget_task()/list_tasks()/cancel_task()-- Task managementsubscribe_to_task()/resubscribe()-- Real-time task updatesset_push_config()/get_push_config()/list_push_configs()/delete_push_config()-- Push notificationsget_authenticated_extended_card()-- Extended agent info
Features
| Feature | Default | Purpose |
|---|---|---|
tls-rustls |
Yes | HTTPS via rustls (no OpenSSL) |
signing |
No | Agent card signature verification |
tracing |
No | Structured logging (zero-cost when off) |
websocket |
No | WebSocket transport |
grpc |
No | gRPC transport via tonic |
Agent Discovery
use resolve_agent_card;
let card = resolve_agent_card.await?;
let client = from_card?.build?;
// or shorthand:
let client = from_card?;
HTTP caching supported via ETag / If-None-Match / If-Modified-Since.
Streaming
let mut stream = client.stream_message.await?;
while let Some = stream.next.await
Interceptors & Auth
use ;
let store = new;
store.set;
let client = new
.with_interceptor
.with_retry_policy
.build?;
Transport Selection
- Auto-selects from agent card's
supported_interfaces - Override via
ClientBuilder::with_transport() - JSON-RPC 2.0 is default (most widely supported)
License
Apache-2.0