Client Overview
Use a2a::client::A2AClient with a concrete ClientTransport to call A2A servers.
Client capabilities
SendMessageGetTaskListTasksCancelTaskSendStreamingMessageSubscribeTaskCreateTaskPushNotificationConfigGetTaskPushNotificationConfigListTaskPushNotificationConfigsDeleteTaskPushNotificationConfig- Client interceptors via
ClientInterceptor - Per-call settings through
CallOptions
Typical flow
- Fetch an Agent Card with
DiscoveryClient. - Select an endpoint with
AgentCardResolver::SelectPreferredInterface. - Construct
HttpJsonTransport,JsonRpcTransport, orGrpcTransport. - Create
A2AClientwith the transport. - Invoke task, streaming, or push-notification APIs.
- Call
Destroy()during shutdown when you need transport cleanup.
Default outbound HTTP
When libcurl is available and A2A_ENABLE_LIBCURL=ON, default constructors/factories can perform buffered outbound REST, JSON-RPC, and discovery calls. For tests, custom TLS policy, mTLS, retries, or embedded runtimes, inject your own requester/fetcher callbacks.
Runnable examples
examples/apps/hello_agent/main.cppexamples/apps/simple_client/main.cppexamples/apps/streaming_client/main.cppexamples/apps/push_notifications/main.cpp