agentbus
AgentBus is a localhost MCP sidecar server for multi-agent coordination, providing a structured event log and advisory lease locks backed by SQLite.
Event Log
Publish events (
agentbus_publish): Append validated events to a topic with support for payloads, producer identity, causation chaining, schema versioning, and idempotency keys.Poll events (
agentbus_poll): Fetch events from a topic using asince_idcursor for at-least-once delivery, with configurable limits.Check status (
agentbus_status): Retrieve workspace bus health, event counts, and topic listings.
Advisory Lease Locks
Acquire a lock (
agentbus_lock_acquire): Claim an exclusive advisory lease on a resource (e.g., a shared file) with an optional TTL and owner identity.Release a lock (
agentbus_lock_release): Release a held lease by providing the resource, lease ID, and owner ID (idempotent if already expired).Renew a lock (
agentbus_lock_renew): Extend the TTL of an active lease as a heartbeat to prevent expiration.Check lock status (
agentbus_lock_status): Inspect the current lock state of a resource without acquiring it.
Key Properties
Mutating operations (publish, lock acquire/release/renew) require authentication via an ephemeral workspace token.
Read operations (poll, status, lock_status) are open and unauthenticated.
Designed to coordinate heterogeneous, out-of-process agents (Cursor, Claude Code, etc.) over stdio MCP.
Enables Hermes agents to publish and poll structured events in a multi-agent workspace via MCP.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agentbusshow recent handoff events"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AgentBus
The SQLite-Backed MCP Event Bus & Control Surface for Heterogeneous Agent Swarms.
When Cursor, Claude, Antigravity, and Terminal Agents (like Hermes) share a workspace, they usually coordinate through fragile append-only files (log.md). That works until you need SLA timeouts, Human-in-the-Loop (HITL) intercepts, strict schema validation, or cryptographic RBAC.
AgentBus replaces the "Game of Telephone" with a localhost sidecar: a Python MCP server backed by SQLite. No orchestrator runtime lock-in. No heavy cloud dashboard. Just a hyper-fast local pub/sub built for top-tier AI orchestration.
v0.11.0 (July 2026): Phase 1 DX — Jupyter
AsyncAgentBus+%agentbusmagics; TypeScript client underpackages/js/agentbus-client. Orchestration DX (up/down/ps/logs) + God View remain from v0.10/v0.9.Note: Install as
okf-agentbus(CLI command remainsagentbus). Extras:[obs,devex,jupyter,sdk].
⚡ The "Ah-Ha" Moment: Zero-Restart Integration
Already running Aider, OpenHands, or custom agents in tmux panes? Do not kill your sessions. AgentBus features a dual-interface architecture (MCP + CLI). You don't need to wire up JSON configs to test it today. Just prompt your running agent:
"Use your terminal to run
agentbus publish --topic okf/handoff --payload '{\"from\":\"grok\",\"to\":\"hermes\",\"summary\":\"Write tests\"}'"
The SQLite bus instantly captures it, without requiring the MCP server. Once you're convinced by the Mission Control TUI, you can wire up the strongly-typed MCP server for your next boot.
Related MCP server: claude-sync
Why AgentBus?
Alternative | Limitation | AgentBus |
| No schema, race conditions | Typed topics, monotonic IDs, advisory locks |
LangGraph / CrewAI | Same-runtime lock-in | Heterogeneous out-of-process clients (IDE + CLI) |
LangSmith | Cloud-only, backward-looking | Local SQLite, forward-looking Execution TUI |
Redis pub/sub | Extra daemon, complex setup | Zero-config SQLite, native stdio MCP |
Feature Arsenal (v0.3 - v0.11)
Jupyter async client (v0.11):
from agentbus.jupyter import AsyncAgentBus+%agentbus start— non-blocking polls that yield to the notebook event loop.TypeScript client (v0.11):
packages/js/agentbus-client— Node EventEmitter + MCP stdio spawn (@agentbus/agentbus-client, path install for now).God View Mesh (v0.9): Passive OS + MCP observability so silent agents still leave bus footprints (
system/mcp,system/fs,system/shell,system/monologue).Mission Control TUI (v0.8+): A rich, keyboard-driven
Textualdashboard (agentbus monitor). Trace waterfall, HITL, Wiretap pane, Dark Agent warnings.Pluggable Pydantic Schemas (v0.7): Code-first
@bus.topicdecorators to enforce strict JSON schemas at the insertion layer.Distributed Context (v0.6): Pass massive context (like git diffs) via
--attach. Hard 1MB payload limits prevent context window explosion.Agentic Observability (v0.5): Native OpenTelemetry-style
trace_idandparent_span_idlineage.SLA Timeouts & Dead-Letter (v0.4): Prevent phantom deadlocks. If an agent ghosts the swarm, SLA timers route the payload to
okf/dead-letter.Swarm RBAC & Droid Proofs (v0.3): Cryptographic JWT/UUID tokens ensure only authorized agents can publish to restricted topics.
HITL Intercepts (v0.3): Catch dangerous payloads (e.g.,
DROP TABLE) and place them inPENDING_APPROVALfor human review via the TUI.
Install
The fastest way (Installs & Auto-wires your IDEs in one step):
curl -sSL https://raw.githubusercontent.com/onicarps/agentbus/main/install.sh | bashOr manually via pip:
pip install -U "okf-agentbus[devex,sdk]"
agentbus init --apply --producer-id my-agentJupyter notebooks:
pip install -U "okf-agentbus[jupyter]"%load_ext agentbus.jupyter
%agentbus start
# or
from agentbus.jupyter import AsyncAgentBus
bus = AsyncAgentBus() # AGENTBUS_WORKSPACE or cwd
bus.on_event(print)
await bus.start_background(interval=1.0)TypeScript (from monorepo checkout):
cd packages/js/agentbus-client && npm install && npm test
# set AGENTBUS_WORKSPACE + agentbus on PATH, then use createStdioMcpClient / AgentBusQuickstart & Examples
The best way to understand AgentBus is to read our copy-pasteable examples.
See the examples/ directory for 7 flawless, isolated Python scripts covering every feature from basic Pub/Sub to Pydantic Schemas and SLA Timeouts.
# Terminal A — Launch the Mission Control TUI
agentbus monitor
# Terminal B — Publish a handoff
agentbus publish \
--topic okf/handoff \
--payload '{"from":"cursor","to":"hermes","summary":"Write tests"}'God View Observability (v0.9.0):
Track silent agents by wiretapping their operations:
# Intercept MCP tool calls
mcp-serve --wiretap
# Watch file edits and command executions
agentbus watch
# Tail internal agent reasoning logs
agentbus tailEvents will stream into the TUI's Wiretap pane as system/mcp, system/fs, system/shell, and system/monologue topics.
📦 Workspace Isolation (The .agentbus directory)
AgentBus operates on the concept of Workspace Isolation (similar to how git uses .git or Docker uses docker-compose.yml).
The bus and its events are physically scoped to the directory you run it in. This prevents your Swarm from tracking your entire operating system or cross-contaminating different projects.
When you navigate to a specific project folder and run agentbus init or agentbus up, it creates a localized .agentbus/events.db SQLite database specifically for that directory.
1-Click Swarm Orchestration (v0.10.0)
Instead of manually opening 5 tmux panes to start your agents and observability daemons, use the new orchestrator:
cd /path/to/my-project
# 1. Generate a boilerplate .agentbus/swarm.yaml
agentbus up --init
# 2. Boot the swarm (Watchers, Agents, and TUI) in one click
agentbus up
# 3. View running background agents
agentbus ps
# 4. Safely kill the entire swarm
agentbus downDocumentation
For full architectural documentation, see the docs/ directory.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceMCP coordination primitive for multi-agent workflows. Lets multiple AI coding agents (Claude Code, Cursor, n8n, custom clients) discover each other and exchange messages and tasks via a shared SQLite-backed message bus.Last updated5763MIT
- Alicense-qualityCmaintenanceLocal-first MCP server that enables multiple Claude agents to coordinate through a shared message bus with SQLite persistence and real-time clock anchoring.Last updatedMIT
- Alicense-qualityDmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.Last updated381Apache 2.0
- Flicense-qualityDmaintenancePersistent, append-only event log for AI agent coordination, enabling agents to publish, query, and react to structured events across tools and sessions.Last updated221
Related MCP Connectors
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/onicarps/agentbus'
If you have feedback or need assistance with the MCP directory API, please join our Discord server