a2a-server

command
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 20 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.

Documentation

Overview

a2a-server starts an in-process A2A server around a real local Agent, then calls it through the A2A client.

v1 host shape: the bridge takes an adaptor.Runner. Passing the *Agent plus Session: a2a.ThreadByContextID() makes each distinct A2A contextID a conversation of its own using a collision-free, namespace-encoded Thread key, so follow-up messages in the same context continue where they left off. Swap in a2a.Stateless() (the default) for one-shot task servers.

The A2A wire DTO is deliberately unchanged by the v1 rewrite: remote peers still see adapter.stream.v1 envelopes, so the client half of this example decodes exactly what it always did.

Usage:

go run ./examples/a2a-server -agent=codex
go run ./examples/a2a-server -agent=claude -prompt="Reply with one sentence"
go run ./examples/a2a-server -serve-only -addr=127.0.0.1:8080

The example requires the selected local CLI in PATH and existing authentication.

Jump to

Keyboard shortcuts

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