This is a Go implementation of the A2A Local Hub defined in SPECIFICATION.md. It exposes a JSON-RPC 2.0 API over a Unix domain socket and HTTP, provides a CLI, and includes a basic terminal UI (TUI).
- JSON-RPC 2.0 hub methods and message send flow
- Unix socket transport (NDJSON)
- HTTP transport with health endpoint, agent cards, and SSE
- CLI for start/stop/status/agents/send/tasks
- Interactive TUI with real-time streaming output
- Local persistence for tasks/contexts in
~/.a2a-hub - Claude flexibility: Model selection, tool restrictions, session continuation
- Codex flexibility: Model/profile selection, sandbox + approval policy, web search
- Multi-agent support with @mentions (
@claude task1, @gemini task2)
git clone https://github.com/soikat/agents-hub.git
cd agents-hub
go install ./cmd/agents-hubThis installs the agents-hub binary to your $GOPATH/bin (or $GOBIN if set).
go build ./cmd/agents-hub./agents-hubIn another terminal:
./agents-hub send codex "Write a hello world function in Go"Start the hub in the foreground:
./agents-hub start --foregroundCommon options:
--socket /tmp/a2a-hub.sock--http-port 8080--no-http--verbose--orchestrator-agents codex,gemini(ornoneto disable)--orchestrator-router vibe(agent ID to enable LLM-driven routing)
Environment:
ORCHESTRATOR_AGENTS=codex,gemini(ornoneto disable)ORCHESTRATOR_ROUTER=vibe(agent ID to enable LLM-driven routing)CLAUDE_CMD=/path/to/claude(override agent executable)GEMINI_CMD=/path/to/geminiCODEX_CMD=/path/to/codexVIBE_CMD=/path/to/vibe
Stop the hub:
./agents-hub stopCheck hub status:
./agents-hub statusList agents (with health):
./agents-hub agents --healthSend a message to an agent:
./agents-hub send codex "Write a hello world function in Go"List recent tasks:
./agents-hub tasks --limit 20Launch the Bubble Tea terminal UI (default when no subcommand is used):
./agents-hubExplicit launch:
./agents-hub tuiTUI options:
--socket /tmp/a2a-hub.sock--no-socket--http-port 8080--no-http--orchestrator-agents codex,gemini(ornoneto disable)--orchestrator-router vibe(agent ID to enable LLM-driven routing)
Commands inside the TUI:
tab/shift+tabto switch tabsrrefreshqquitentersend message (Send tab)/orescopen command palette
Command palette commands:
/status,/agents,/tasks,/history,/settings- navigate tabs/send <agent> <msg>- send a message/agent <id>- set target agent/claude-model <opus|sonnet|haiku>- set Claude model/claude-tools <safe|normal|full>- set Claude tool profile/claude-continue- toggle session continuation/codex-model <model>- set Codex model/codex-profile <profile>- set Codex config profile/codex-sandbox <read-only|workspace-write|danger-full-access>- set Codex sandbox/codex-approval <untrusted|on-failure|on-request|never>- set Codex approval policy/codex-search- toggle Codex web search/help- show help overlay
Default host/port: 127.0.0.1:8080
POST /JSON-RPC endpointPOST /a2aA2A JSON-RPC endpointGET /healthGET /.well-known/agent.jsonGET /.well-known/agentsGET /.well-known/agents/{agentId}.jsonPOST /streamSSE endpoint
Example JSON-RPC call:
curl -s http://127.0.0.1:8080/ \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"hub/status","params":{},"id":"1"}'The hub stores tasks and contexts locally:
~/.a2a-hub/tasks.json~/.a2a-hub/contexts.json~/.a2a-hub/settings.json(TUI settings including Claude + Codex configuration)
State is loaded on startup.
Claude has enhanced flexibility with configurable options:
Choose which Claude model to use:
# Via TUI command
/claude-model sonnet
# Options: opus, sonnet, haiku (blank for default)Control which tools Claude can use:
| Profile | Tools Allowed |
|---|---|
safe |
Read, Glob, Grep, LSP (read-only) |
normal |
+ Edit, Write, WebFetch, WebSearch |
full |
All tools (default) |
# Via TUI command
/claude-tools safeEnable Claude to continue previous conversations:
# Toggle via TUI command
/claude-continueWhen enabled, Claude uses --continue to resume the most recent session context.
In the TUI Settings tab, use Tab/Shift+Tab to navigate between:
- Orchestrator delegates
- Claude model
- Claude tool profile
- Continue mode checkbox (Space to toggle)
- Codex model
- Codex profile
- Codex sandbox
- Codex approval policy
- Codex web search (Space to toggle)
Press Enter to save each field.
Claude exposes these skills for intelligent routing:
code-review- Review code for quality and bugsrefactor- Restructure codewrite-tests- Write unit/integration testsdebug- Diagnose and fix bugsexplain- Explain code architecturedocument- Write documentationarchitect- Design system architectureimplement- Write new code
Codex supports additional runtime configuration:
# Via TUI command
/codex-model o3# Use a named profile from ~/.codex/config.toml
/codex-profile my-profile# Sandbox modes: read-only, workspace-write, danger-full-access
/codex-sandbox workspace-write
# Approval policies: untrusted, on-failure, on-request, never
/codex-approval on-request/codex-searchGemini supports runtime configuration:
# Via TUI command
/gemini-model gemini-1.5-proIn the TUI Settings tab, you can configure the default Gemini model.
Send tasks to multiple agents using @mentions:
# In TUI Send tab
@claude write the API, @gemini write the frontend
# Comma or "and" separated
@codex implement auth and @vibe review itEach agent runs concurrently with its own streaming output.
- Agent CLIs (claude, gemini, codex, vibe) must be installed and available in
PATH. - Unix socket is the default transport used by the CLI/TUI (CLI
sendwill try A2A over HTTP first when available). - CLI/TUI send the current working directory to agents when available (Codex uses it for
--cd).