Expand description
HTTP client for sending A2A requests.
Modules§
- auth
- Authentication interceptor and credential storage.
- balance
- Calls spread over several endpoints of one agent, with failing ones ejected and idempotent calls optionally hedged (ADR 0050, audit H12).
- builder
- Fluent builder for
A2aClient. - client
- Core
A2aClientstruct and constructors. - config
- Client configuration types.
- delegation
- A task delegated to another agent, cancelled with its parent.
- discovery
- Agent card discovery with HTTP caching.
- error
- Client error types.
- interceptor
- Request/response interceptor infrastructure.
- jwks
signing - Fetching a JWK Set to verify an agent card’s signatures with (
signingfeature). - methods
- Per-method client helpers.
- otel_
baggage - W3C Baggage on outbound calls, and
OTEL_PROPAGATORS(audit C-10; ADR 0038 §1). - retry
- Configurable retry policy for transient client errors.
- streaming
- SSE client-side streaming support.
- testing
testing - Scripted hostile peers, for testing whatever calls an agent.
- tls
tls-rustls - TLS connector via rustls, and the HTTP client every HTTP call shares.
- token_
provider - Token acquisition:
TokenProvider, OAuth 2.0 client-credentials, and OIDC discovery. - trace_
propagation - Propagating W3C trace context on outbound calls.
- transport
- Transport abstraction for A2A client requests.
- version_
query - Sends the protocol version as a request parameter as well as a header.
- webhook
webhook - The receiving side of push notifications (spec §4.3.3, §13.2).
Structs§
- A2aClient
- A client for communicating with A2A-compliant agents.
- Auth
Interceptor - A
CallInterceptorthat injectsAuthorizationheaders from aCredentialsStore. - Bearer
Auth Interceptor - A
CallInterceptorthat injectsAuthorization: Bearer <token>from aTokenProviderbefore every request. - Client
Builder - Builder for
A2aClient. - Client
Config - Configuration for an
crate::A2aClientinstance. - Client
Request - A logical A2A request as seen by interceptors.
- Client
Response - A logical A2A response as seen by interceptors.
- Current
Trace - The trace the current task is running under.
- Event
Stream - An async stream of
StreamResponseevents from an SSE endpoint. - Grpc
Transport grpc - gRPC transport for A2A clients.
- Http
Pool tls-rustls - One set of HTTP connections that many clients share.
- Http
Pool Builder tls-rustls - Builds an
HttpPool:HttpPool::builder. - InMemory
Credentials Store - An in-memory
CredentialsStorebacked by anRwLock<HashMap>. - Interceptor
Chain - An ordered list of
CallInterceptors applied to every request. - Json
RpcTransport - JSON-RPC 2.0 transport: HTTP POST to a single endpoint.
- OAuth2
Client Credentials - A
TokenProviderimplementing the OAuth 2.0 client credentials grant (RFC 6749 §4.4) with caching and proactive refresh. - Origin
Snapshot - The state of one origin at one moment, from
HttpPool::origins. - Propagators
- Which propagators
OTEL_PROPAGATORSturns on for the A2A wire. - Rest
Transport - REST transport: HTTP verbs mapped to REST paths.
- Retry
Budget - How many retries a client may make, as a fraction of the calls it makes.
- Retry
Policy - Configuration for automatic retry with exponential backoff.
- Session
Id - Opaque identifier for a client authentication session.
- Static
Token Provider - A
TokenProviderthat always returns the same fixed token. - Trace
Propagation Interceptor - Writes the ambient
CurrentTraceonto each outbound request. - WebSocket
Transport websocket - WebSocket transport: JSON-RPC 2.0 over a persistent WebSocket connection.
- WebSocket
Transport Config websocket - Configuration for
WebSocketTransport::connect_with_config. - Webhook
Receiver webhook - Checks webhook requests against the push configs a client registered (spec §4.3.3, §13.2).
Enums§
- Baggage
Policy - Which baggage entries cross the A2A wire.
- Client
Error - Errors that can occur during A2A client operations.
- Credential
Preflight - What a client built from an agent card does with a call whose credentials
satisfy none of the card’s security requirements (spec §3.1.11). Set with
ClientBuilder::with_credential_preflight. - Grpc
Bare Address Scheme - How a gRPC interface address that carries no scheme is connected.
- Webhook
Outcome webhook - What became of one webhook request.
- Webhook
Rejection webhook - Why a webhook request was refused.
Traits§
- Call
Interceptor - Hooks called before every A2A request and after every response.
- Credentials
Store - Persistent storage for auth credentials, keyed by session + scheme.
- Token
Provider - A source of bearer access tokens.
- Transport
- The low-level HTTP transport interface.
Functions§
- new_
message_ id - A new message id: a random UUID (version 4), as a
MessageId. - resolve_
agent_ card - Fetches the
AgentCardfrom the standard well-known path.
Type Aliases§
- Client
Result - Convenience type alias:
Result<T, ClientError>.