Skip to main content
Same outbound A2A behavior as A2A Config, but builds clients explicitly with pkg/a2a/client and WithA2AClients. Source: examples/agent_with_a2a_client/

What it demonstrates

  • a2aclient.NewClient with timeout, token, skill filter options
  • Pre-built clients for custom transport wiring
  • Same A2A_* env vars as config example

Run

From examples/:
go run ./agent_with_a2a_client
go run ./agent_with_a2a_client "What tools do you have available?"

Local server workflow

  1. Terminal 1: go run ./agent_with_a2a_server
  2. Terminal 2: export A2A_URL=http://localhost:9999 then run this example
Env vars: A2A_URL, optional A2A_TOKEN, A2A_HEADERS, A2A_ALLOW_SKILLS, A2A_BLOCK_SKILLS — see Configuration.

Expected output

With agent_with_a2a_server running in terminal 1:
I can reach a remote agent that exposes skills including echo and calculator.
How can I help you today?

Learn more

A2A

A2A feature documentation

A2A Config

WithA2AConfig variant