agent_with_a2a_server

command
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

README

agent_with_a2a_server

Runs your agent as an inbound A2A HTTP server (dynamic agent card + JSON-RPC v2 on POST / — PascalCase methods such as SendMessage, SendStreamingMessage, per a2asrv).

Prerequisites

  • Temporal + LLM in examples/.env (see ../env.sample).
  • Optional A2A_SERVER_HOST, A2A_SERVER_PORT (defaults localhost:9999).
  • Optional A2A_SERVER_BEARER_TOKENS — comma-separated secrets; JSON-RPC calls must send Authorization: Bearer <token> (agent card GET stays unauthenticated).

Run

From examples/:

go run ./agent_with_a2a_server

The process prints the base URL and agent card URL to stderr; Ctrl+C to stop.

Quick checks

Replace host/port if you changed A2A_SERVER_*:

curl -sS "http://localhost:9999/.well-known/agent-card.json" | head

Test as a client from this repo

Second terminal, examples/:

export A2A_URL=http://localhost:9999
go run ./agent_with_a2a_config "What tools do you have?"

See ../agent_with_a2a_config/README.md for remote-server testing patterns.

Test with the a2a CLI

Install from a2aproject/a2a-go — CLI:

go install github.com/a2aproject/a2a-go/v2/cmd/a2a@latest

a2a discover http://localhost:9999
a2a send http://localhost:9999 "Hello, what can you do?"

Full flags: a2a help; reference: a2a-go cmd/README.md. With A2A_SERVER_BEARER_TOKENS, see a2a help send for bearer options.

Env vars (inbound server)

See A2A_SERVER_* rows in examples/README.md and ../env.sample.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL