SQLite-backed MCP event bus and control surface for heterogeneous agent orchestration.
Project description
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.8.0 (July 2026): Now includes the
Textual-based Mission Control TUI, Swarm RBAC, SLA Timeouts, Distributed Artifact Context, and Code-First Pydantic Schemas.Note: Install as
okf-agentbus(CLI command remainsagentbus).
Why AgentBus?
| Alternative | Limitation | AgentBus |
|---|---|---|
log.md blackboard |
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.8)
- Mission Control TUI (v0.8): A rich, keyboard-driven
Textualdashboard (agentbus monitor). View live trace waterfalls and approve/reject HITL tasks with a single keystroke. - 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
pip install "okf-agentbus[devex,sdk]"
Quickstart & 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"}'
Documentation
For full architectural documentation, see the docs/ directory.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file okf_agentbus-0.8.0.tar.gz.
File metadata
- Download URL: okf_agentbus-0.8.0.tar.gz
- Upload date:
- Size: 50.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
316ecaac322d2253a9f332541c778e918ddbd4113af5897a69ac10e6e7a6f145
|
|
| MD5 |
55621f86fd555b68095013eb97ffc90f
|
|
| BLAKE2b-256 |
8d5c48400f882481b7489fb37e0f97586550ed43bd1d67449fc305a3269edbfe
|
File details
Details for the file okf_agentbus-0.8.0-py3-none-any.whl.
File metadata
- Download URL: okf_agentbus-0.8.0-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c8f947654ec778f6cedf365b6d5328b39fd2f8b0ba00d9ee390ff2f4392ad99
|
|
| MD5 |
64147266cb38786340b796588097c35a
|
|
| BLAKE2b-256 |
5973c69c37ad63f04a0474c3f070ac88c78a68a9aba71107cb04a333aeb871eb
|