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.14.0.tar.gz (141.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.14.0-py3-none-win_amd64.whl (7.1 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3macOS 11.0+ x86-64

okf_agentbus-0.14.0-py3-none-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: okf_agentbus-0.14.0.tar.gz
  • Upload date:
  • Size: 141.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.14.0.tar.gz
Algorithm Hash digest
SHA256 102245808cad2f7852426628a44254c46522b2a3cabf00869e114ec56e0978ca
MD5 a7db2f1f0646da6c589199021c950486
BLAKE2b-256 ff3e9b47b3f13807eb651564075247046356cc01020b97215d592279c14e3d8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.14.0.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.14.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.14.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4a824100677681a6d409483ded2a504aeb985a57958b049eb27088d8d5267ef2
MD5 8474b4cf3d7ee2275c124c250812fdf1
BLAKE2b-256 0aa7c4d4b5efba5cc1e8bc4972128c6aa3003a393a6d6b18f6e924b94c72bf43

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.14.0-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.14.0-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.14.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e05708a20e717718db6ea145e2fd53affb23435477ee37849f0cd62cc703378
MD5 e946a4b3cf0cb3c36263f9d3706d298b
BLAKE2b-256 83bbbadbbfd081cc95fcbc343a705263ba1f2193cba2447c8609945b9f83ac2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.14.0-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.14.0-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.14.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a55da5406458b7a04b3176cdabf4b8f5ea066f4558a73e9c2c3ba3e104b7750d
MD5 3ad2e02fb9f58a38a431ca3d41c5c215
BLAKE2b-256 6bd1f5f72577706018cf2e1fd546eb8145be40fbdc3a4498e23443c5a979da96

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.14.0-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.14.0-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.14.0-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 adcab824b07a5f9d924d7b79e211d02d27a716ef70034f18ac3bf5f985e7e24e
MD5 bcf072eb475ad2eab1b341ad4e774bf7
BLAKE2b-256 42c3414308f9fd0b1c0d6e7f9b142eb992fc99f3458fce92717f4dbae38bbff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.14.0-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.14.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for okf_agentbus-0.14.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27610c644b0029a70123220a7f8da94ef26e351aa31236c54269f9a8ebb84501
MD5 2ce4113781e21c3dc9e81135979eab8c
BLAKE2b-256 9b5443350c0008400c0b9227323bdefe466dc8ce310bc2e2835f4479eaaf9b22

See more details on using hashes here.

Provenance

The following attestation bundles were made for okf_agentbus-0.14.0-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

0.16.2

6 files

0.16.1

6 files

0.16.0

6 files

0.15.0

6 files

This release

0.14.0 This release

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