Skip to main content

AgentBus

Test Python License: MIT

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 + %agentbus magics; TypeScript client under packages/js/agentbus-client. Orchestration DX (up/down/ps/logs) + God View remain from v0.10/v0.9.

Note: Install as okf-agentbus (CLI command remains agentbus). 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.

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.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 Textual dashboard (agentbus monitor). Trace waterfall, HITL, Wiretap pane, Dark Agent warnings.
  • Pluggable Pydantic Schemas (v0.7): Code-first @bus.topic decorators 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_id and parent_span_id lineage.
  • 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 in PENDING_APPROVAL for 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 | bash

Or manually via pip:

pip install -U "okf-agentbus[devex,sdk]"
agentbus init --apply --producer-id my-agent

Jupyter 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 / AgentBus

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"}'

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 tail

Events 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 down

Documentation

For full architectural documentation, see the docs/ directory.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

okf_agentbus-0.16.2.tar.gz (186.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

okf_agentbus-0.16.2-py3-none-win_amd64.whl (7.1 MB view details)

Uploaded Python 3Windows x86-64

okf_agentbus-0.16.2-py3-none-macosx_11_0_x86_64.whl (7.1 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

okf_agentbus-0.16.2-py3-none-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file okf_agentbus-0.16.2.tar.gz.

File metadata

  • Download URL: okf_agentbus-0.16.2.tar.gz
  • Upload date:
  • Size: 186.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for okf_agentbus-0.16.2.tar.gz
Algorithm Hash digest
SHA256 b0124c53470bb303bd57707418d243e37e6724cf45b73794db2ef110e5a4636c
MD5 85a85e8afc1edb622e0944b55c995ff8
BLAKE2b-256 61b20d1f009e3d772f7ce12196ff8574df5b89a525163b23893860d5edc85608

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.16.2.tar.gz:

Publisher: release.yml on onicarps/agentbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file okf_agentbus-0.16.2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.16.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1faaae0a86c165c2f312eef88eccfb9c11535a94c84ea97675189381ec634c73
MD5 bf8a0ce8ebf461332c73570335ed1ab6
BLAKE2b-256 150d3215e678fb92abe7aa89443ef9f572ac38523eddd836b1e6a82aa605ff75

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.16.2-py3-none-win_amd64.whl:

Publisher: release.yml on onicarps/agentbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file okf_agentbus-0.16.2-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.16.2-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dce766d25dbe947386a6b0e24053dfd12633192f13260381b35336c8b30f4715
MD5 bd23fa9ad739cd396d76d6c2312b370e
BLAKE2b-256 9ec6c9f1df04e40b38d6d208f1db11123ef2462ff478fd16893314fb5465acd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.16.2-py3-none-manylinux2014_x86_64.whl:

Publisher: release.yml on onicarps/agentbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file okf_agentbus-0.16.2-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.16.2-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 91091a7aa5a4c337c328b6b33648c14ea67a23c522cc60ed3355e969cfa63486
MD5 f3789a6c13df09e7010dfc413eb13018
BLAKE2b-256 0ce962c01e2707b1e5ffb48e4fc386557a4e1b95e46d311acb4702a454fb9276

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.16.2-py3-none-manylinux2014_aarch64.whl:

Publisher: release.yml on onicarps/agentbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file okf_agentbus-0.16.2-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.16.2-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 a4303dbe27d45408a3ac199be08957bf8ae32a40be6e9371a5ef1bfba037ac52
MD5 773faff7c31efebafa67e61e13397d1a
BLAKE2b-256 49e5da42aeec13e9dc36449acc0a31424b4215c92d7f022561f443e790361bc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.16.2-py3-none-macosx_11_0_x86_64.whl:

Publisher: release.yml on onicarps/agentbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file okf_agentbus-0.16.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.16.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e0206aeddb6dc1694598323d54540987e444d67dbe57bc821877a8f9f25c065
MD5 10982f03547f99c83b5cc7a92c561e7c
BLAKE2b-256 ebf3cdf28110c1e3022b167c8afc77dadea95d6cf8ddaa48de1358d3216a9765

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.16.2-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on onicarps/agentbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.20.0

6 files

0.19.0

6 files

0.18.0

6 files

0.17.0

6 files

0.16.4

6 files

0.16.3

6 files

This release

0.16.2 This release

6 files

0.16.1

6 files

0.16.0

6 files

0.15.0

6 files

0.14.0

6 files

0.13.0

6 files

0.12.1

6 files

0.12.0

6 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.2.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page