Because the ideas are:
π§ Agents shouldnβt have to call each other directly.
π¨ Let them speak in events.
a2a-bus is a schema-first, event-driven messaging architecture for intelligent agents that want to talk to each other β but without tight coupling or direct calls.
Instead of HTTP-based (direct) communication between agents, this repo demonstrates how to:
- π§ Publish and consume events over Kafka or NATS JetStream (w/ Docker Compose, but TODO)
- π¨ Standardize event structure using JSON Schema, Avro, and Protobuf
- π Simulate multi-agent flows with testing tools and local dev setups
π§ͺ Whether you're building tool-using LLM agents, multi-agent systems, or AI-native protocols β this repo is here to help you scale communication via topics, not endpoints.
Agent-to-agent (A2A) interoperability is emerging as a core challenge in the LLM and multi-agent ecosystem. Most current implementations are:
- tightly coupled via REST/webhook calls,
- hard to trace or replay,
- lacking shared message schemas,
- or too brittle to generalize.
This repo proposes a reference architecture using:
- π§ loosely coupled agents,
- π¨ brokered event flows,
- π shared schema contracts, and
- π tooling to simulate, replay, and debug interactions.
Inspired by Googleβs A2A protocol vision, but focused on real-world, event-driven backends.
a2a-bus/
βββ schema/ # π JSON, Avro, and Proto3 message schemas
βββ ts/ # π§ TypeScript agents (publisher, subscriber)
βββ go/ # π§ Go-based agent implementations
βββ python/ # π§ Python publisher/consumer samples
βββ docker/ # π³ Kafka, Schema Registry, NATS JetStream
βββ tools/ # π Simulator & testing CLI to publish A2A events
βββ README.md # You are here.
- β Multi-language agents (TS, Go, Python) all speaking A2A
- β Brokered communication over NATS using intent-based topics
- β Schema-driven message formats (JSON Schema, Avro, Proto)
- β CLI simulator agent for sending test messages and testing flows
- β Docker Compose setup for local development and orchestration
- β
Standardized event format (
headers,payload,meta) per A2A guidelines - β
Message replay and test automation support (via
test.sh)
# 1. Start all agents and brokers
docker compose up --build
# 2. Run a test message using the CLI simulator
./test.sh summarize.article "Hello from simulator"Alternatively, invoke it manually:
docker compose run --rm simulator summarize.article "Hello from simulator"Agents subscribed to the intent will receive the event and act on it.
Located in tools/, the simulator can send any valid A2A event:
# Usage
docker compose run --rm simulator <intent> "<text>"
# Example
docker compose run --rm simulator summarize.article "Summarize this input text"π§ Use it to trigger agent flows, test message schemas, or script behaviors via test.sh.
Please use schema/ definitions to ensure contract-based communication. Extend with your own tools, agents, or topics.
The schemas do not hardcode allowed values for intent, which is a deliberate and extensible choice. This allows agents to define new intents freely, including "summarize.article", "translate.snippet", "search.docs", etc.
This project is early-stage, naive, and meant to inspire more robust agent bus standards. We welcome:
- π feedback on schema design
- π¬ proposals for message types and routing
- π adapters for new brokers or runtimes
- π§ͺ examples of agents in action
Open an issue or pull request β or just fork and experiment.