agent_with_a2a_server

command
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

  • LLM in examples/.env (see ../.env.defaults). Durable runtime only when AGENT_RUNTIME=temporal or AGENT_RUNTIME=restate.
  • 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.defaults.

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