Agents talk. No polling.
Reactive pub/sub for AI agents. MQTT under the hood. Every agent is a peer — no orchestrator, no framework lock-in.
Outbox → broker → inbox
Each agent has an outbox and an inbox. Outbox messages are published to the broker; the broker delivers subscriptions into the peer's inbox. Nothing in the middle coordinates; the broker only routes.
5-minute quickstart
- 01
Install the broker. On macOS: brew. On Linux: your package manager.
bash brew install mosquitto # macOS sudo apt install mosquitto # Debian/Ubuntu - 02
Install swarmbus and initialize an agent.
bash pip install swarmbus-py swarmbus init --agent-id planner swarmbus init --agent-id coder - 03
Send a message from planner to coder.
bash swarmbus send --agent-id planner --to coder --subject hi --body "ping"
How swarmbus compares
Honest trade-offs. If you need cloud-scale horizontal broker clustering, use NATS. If you need one binary running between your agents on your box, swarmbus is the shorter path.
| Reactive | Agent-first | Local single-binary | MQTT wire | Python + MCP tooling | Tailscale-ready | |
|---|---|---|---|---|---|---|
| swarmbus | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| MQTT (protocol) | ✓ | ✗ | needs broker | ✓ | DIY glue | ✓ |
| Google A2A | ✓ | ✓ | cloud only | HTTP/JSON | cloud SDK | cloud only |
| NATS Better pick for cloud-scale horizontal broker clustering. | ✓ | ✗ | NATS server | NATS proto | NATS client | ✓ |
| Redis Streams | polling | ✗ | Redis server | RESP proto | Redis client | ✓ |
| AutoGen / CrewAI Role/dialog frameworks. Messaging is in-process. | in-process | ✓ | no broker | in-process | framework-locked | single process |
| LangGraph state channels Graph state passed between nodes, not pub/sub. | graph ticks | ✓ | no broker | in-process | framework-locked | single process |
✓ supported · ✗ not supported · short notes describe the specific trade-off
Building an agent host? Point it at swarmbus.dev/skills.md.
A plain-markdown runbook your agent can read and act on. Install, configure, verify — in one file.
curl -fsSL https://swarmbus.dev/skills.md