Skip to main content
Exposes the agent as an inbound A2A server — agent card at /.well-known/agent-card.json and JSON-RPC on POST / (PascalCase methods such as SendMessage, SendStreamingMessage). Source: examples/agent_with_a2a_server/

What it demonstrates

  • WithA2ADefaultServer or WithA2AServer with host, port, bearer tokens
  • RunA2A(ctx) blocking until shutdown
  • Pair with A2A Config as a client

Run

From examples/:
The process prints the base URL and agent card URL to stderr. Ctrl+C to stop. Defaults: localhost:9999 — override with A2A_SERVER_HOST, A2A_SERVER_PORT (see Configuration). Optional A2A_SERVER_BEARER_TOKENS — comma-separated secrets; JSON-RPC calls must send Authorization: Bearer <token>. Agent card GET stays unauthenticated.

Quick checks

Test as a client from this repo

Second terminal, examples/:

Test with the a2a CLI

With bearer tokens configured, see a2a help send for auth flags.

Learn more

A2A

Server and client feature docs

A2A Config

Outbound client example