Skip to main content
Connects to a remote A2A agent using WithA2AConfig and A2A_URL — skills become tools the LLM can call. Source: examples/agent_with_a2a_config/

What it demonstrates

  • agent.A2AServers map with URL, token, skill filters
  • Tool names a2a_<server>_<skillId>
  • Same env as A2A Client — differs only in config vs explicit client

Run

From examples/:

Local server workflow

  1. Terminal 1: go run ./agent_with_a2a_server
  2. Terminal 2: export A2A_URL=http://localhost:9999 then run config or client example
Client 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:
Skills listed depend on what the server advertises in its agent card.

Learn more

A2A

A2A feature documentation

A2A Client

WithA2AClients variant