Expand description
HTTP client for sending A2A requests.
Modules§
- auth
- Authentication interceptor and credential storage.
- builder
- Fluent builder for
A2aClient. - client
- Core
A2aClientstruct and constructors. - config
- Client configuration types.
- discovery
- Agent card discovery with HTTP caching.
- error
- Client error types.
- interceptor
- Request/response interceptor infrastructure.
- methods
- Per-method client helpers.
- retry
- Configurable retry policy for transient client errors.
- streaming
- SSE client-side streaming support.
- tls
- TLS connector via rustls.
- token_
provider - Token acquisition:
TokenProvider, OAuth 2.0 client-credentials, and OIDC discovery. - transport
- Transport abstraction for A2A client requests.
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.
- Event
Stream - An async stream of
StreamResponseevents from an SSE endpoint. - Grpc
Transport - gRPC transport for A2A clients.
- 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. - Rest
Transport - REST transport: HTTP verbs mapped to REST paths.
- 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. - WebSocket
Transport - WebSocket transport: JSON-RPC 2.0 over a persistent WebSocket connection.
- WebSocket
Transport Config - Configuration for
WebSocketTransport::connect_with_config.
Enums§
- Client
Error - Errors that can occur during A2A client operations.
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§
- resolve_
agent_ card - Fetches the
AgentCardfrom the standard well-known path.
Type Aliases§
- Client
Result - Convenience type alias:
Result<T, ClientError>.