Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blablo

A2A protocol hub that registers agents, routes messages between them, and serves a unified agent card for discovery.

Claude Code ──MCP──→ a2a-bridge ──A2A──→ blablo hub ──A2A──→ Agent B
                                              │
                     Agent C ─────────A2A──→  │  ←──A2A── Agent D

Quick Start

# Build
go build -o blablo ./cmd/blablo

# Run with default config (reads config.yaml if present)
./blablo

# Run with explicit config file
./blablo config.yaml

Docker

docker compose up        # from parent directory — runs blablo + a2a-bridge

How It Works

  1. Agents register via the management API — the hub resolves their agent card
  2. Hub serves a dynamic agent card at /.well-known/agent-card.json aggregating all registered agent skills
  3. Clients send messages to POST /a2a — the hub routes to the correct downstream agent via metadata["target_skill"]
  4. Single-agent shortcut — if only one agent is registered, no target metadata needed

HTTP Endpoints

A2A Protocol

Endpoint Description
GET /.well-known/agent-card.json Dynamic agent card with all registered skills
POST /a2a A2A JSON-RPC endpoint (message/send, etc.)

Management API

Method Endpoint Description
POST /agents {"url": "http://agent:9001"} Register an agent (resolves its card)
GET /agents List all registered agents
DELETE /agents/{id} Unregister an agent
GET /health Health check

Examples

# Register an agent
curl -X POST http://localhost:9000/agents \
  -H 'Content-Type: application/json' \
  -d '{"url": "http://localhost:9001"}'

# List registered agents
curl http://localhost:9000/agents

# View hub's agent card
curl http://localhost:9000/.well-known/agent-card.json

# Remove an agent
curl -X DELETE http://localhost:9000/agents/echo-agent

Message Routing

When the hub receives a message, it determines the target agent in this order:

  1. message.metadata["target_skill"] — matches by skill ID or skill Name (case-insensitive)
  2. message.metadata["target_agent"] — matches by agent ID
  3. If exactly 1 agent is registered — routes to it automatically
  4. Otherwise — returns a routing error

The companion a2a-bridge automatically injects target_skill metadata when sending messages.

Configuration

All settings live in a single YAML file. The hub looks for config in this order:

  1. CLI argument: ./blablo myconfig.yaml
  2. CONFIG_FILE env var: CONFIG_FILE=myconfig.yaml ./blablo
  3. Default: config.yaml in the working directory
# config.yaml
port: "9000"

agents:
  - url: http://localhost:9001
  - url: http://localhost:9002

See config.example.yaml for a full example.

Architecture

blablo/
├── cmd/blablo/main.go              # Entry point, wiring, HTTP mux
├── internal/
│   ├── registry/registry.go        # Agent registry + dynamic AgentCard producer
│   ├── hub/
│   │   ├── executor.go             # AgentExecutor: route → proxy → respond
│   │   └── router.go               # Message metadata → target agent resolution
│   ├── proxy/proxy.go              # Outbound a2aclient pool per agent
│   └── api/management.go           # REST management API
├── test/
│   └── integration_test.go         # E2E tests with fake agents
├── go.mod
└── go.sum

Components

  • Registry — stores agents, indexes skills, implements AgentCardProducer for dynamic card generation
  • Router — resolves message metadata to a target agent ID
  • Executor — implements AgentExecutor (A2A SDK interface); routes inbound messages and proxies responses
  • Proxy — manages outbound a2aclient.Client per registered agent
  • Management API — REST endpoints for agent registration/removal

Testing

# Integration tests (spins up fake agents + hub, 18 tests)
go test ./test/ -v

# All tests
go test ./...

Dependencies

About

A2A protocol hub — registers agents, routes messages between them, and serves a unified agent card for discovery

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages