Skip to main content
Glama

agent-inbox

Zero-dependency local MCP message broker for coordinating concurrent AI coding sessions across Antigravity (agy), Claude Code, Codex, OpenCode, and Cursor.

  • Zero daemon, zero ports, zero npm dependencies — backed by a single local SQLite database (WAL mode) using Node 22.5+'s built-in node:sqlite or Bun's built-in bun:sqlite.

  • Cross-harness discovery — every session auto-registers its harness, git branch, cwd, and PID (dead sessions are filtered out automatically).

  • Sub-second replies & idle auto-wakeup — send + wait in a single call (wait_for_reply_seconds), or run agent-inbox watch --name <handle> as a background task so your harness wakes up an idle session automatically when a message lands.

Quickstart

npx -y @dupe/agent-inbox init

init detects which harnesses you have installed (~/.gemini, ~/.claude, ~/.codex, ~/.config/opencode, ~/.cursor), registers the agent-inbox MCP server and lifecycle hooks in each, installs bundled skills into canonical ~/.agents/skills/, and creates relative symlinks in detected harness skill directories (~/.claude/skills/, ~/.codex/skills/, etc.) so there are no duplicate copies to drift.

See docs/ARCHITECTURE.md for the v1 cross-harness Orchestrator → Coordinator → Builder architecture and roadmap.

Or run directly from a local clone:

git clone https://github.com/dupe-com/agent-inbox.git
cd agent-inbox
node ./bin/agent-inbox.mjs init

Check configured harnesses and live sessions anytime:

npx -y @dupe/agent-inbox status

Related MCP server: hardline-mcp

MCP Tools

Tool

Purpose

inbox_whoami

Show this session's handle, harness, branch, and unread count

inbox_register

Claim a short handle (e.g. claude-api, agy-review) + 1-line summary

inbox_list_agents

List all live sessions across harnesses

inbox_send

Direct message or "*" broadcast (optional wait_for_reply_seconds)

inbox_check

Read unread messages (marks read by default)

inbox_wait

Block up to 110s until a new unread message arrives

Auto-Wake an Idle Session (Zero Human Nudge)

MCP tools are pull-based when an agent isn't mid-turn. To wake an idle session automatically as soon as a peer messages it:

agent-inbox watch --name agy-review

Launch watch as a background shell task in Antigravity or Claude Code and end your turn. The moment a message arrives, watch prints the message JSON to stdout and exits 0, triggering your harness's native background-task wakeup.

Lifecycle Hooks (Zero-Nudge Unread Injection)

agent-inbox init automatically installs lightweight lifecycle hooks (pass --no-hooks to opt out) so sessions see unread messages without manual nudges:

  • Antigravity (~/.gemini/config/hooks.json): SessionStart, PreInvocation, and Stop (with continuationActive loop guard)

  • Claude Code (~/.claude/settings.json): SessionStart, UserPromptSubmit, and Stop (with stop_hook_active loop guard)

  • Codex (~/.codex/hooks.json): session_start

Ready-to-copy templates are also included in hooks/agy-hooks.json, hooks/claude-hooks.json, and hooks/codex-hooks.json. Hooks peek unread messages non-destructively (safe when multiple sessions share a worktree), return {} immediately when empty, and always fail open so they never block a turn.

Requirements

  • Node.js >= 22.5 (built-in node:sqlite) or Bun >= 1.1 (built-in bun:sqlite)

Development & Tests

npm test          # Runs multi-process end-to-end tests on Node
npm run test:bun  # Runs the same suite on Bun

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables multiple AI agents to communicate and coordinate via a shared SQLite-backed message log, supporting directed messages, broadcasts, and session discovery.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI agents from different frameworks to communicate asynchronously via a persistent SQLite-backed bus, with doorbell wakeups for sub-second notifications and full message history.
      6
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Code, Codex and opencode sessions on the same machine to message each other live over a local pipe, with threaded replies and offline queuing, and to delegate or spawn one another as background subagents. Messages persist in SQLite and any running server can take over as broker, so peers stay reachable without a daemon.
      5
      MIT