
Agent Comm
io.github.keshrathPublished by GitHub account keshrathv1.3.12Updated Oct 25, 2026
Agent intercommunication - messaging, channels, shared state, and real-time events
Overview
A local Node.js MCP server that lets multiple AI coding agents register, message each other, share key-value state and coordinate file edits in real time.
- What you can do
- Register agents with names, capabilities and skills, then list, discover, heartbeat, set status or unregister them, and create, join, list, archive and read channels with their members and history. Send direct, channel, broadcast, reply and forward messages with importance levels, read the inbox with filters and thread views, and block until a new message arrives. Read and write a shared namespaced key-value store, including atomic compare-and-swap for locks and flags. Log and view activity events, detect stuck agents, and inspect everything through a local web dashboard and REST/WebSocket API.
- When to use it
- Useful when several AI coding agents work on the same codebase at once and need to discover each other, divide work, avoid duplicate edits or merge conflicts, and pass context between sessions. Also suits setups that want file locks and commit guards enforced through pre-tool-call hooks rather than relying on the model to coordinate.
- Requirements
- Runs as a local process via npx or a global npm install of agent-comm, so Node.js is needed. The dashboard and REST API listen on localhost port 3421 by default, configurable with AGENT_COMM_PORT, AGENT_COMM_HOST and AGENT_COMM_RETENTION_DAYS. Data is stored in a local SQLite database. Optional hook scripts must be installed in the host's settings for automatic coordination.
Installation
In SourceWeft
- Open Agent Comm in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
agent-comm
[License: MIT] [Node.js] [Tests] [MCP Tools] [REST Endpoints]
Agent-agnostic intercommunication system. Lets AI coding agents — Claude Code, Codex CLI, Gemini CLI, Aider, or any custom tool — talk to each other, share state, and coordinate work in real time.
Why
When you run multiple AI agents on the same codebase — code review in one terminal, implementation in another, testing in a third — they have no idea the others exist. They duplicate work, create merge conflicts, and miss context.
agent-comm gives them a shared communication layer:
- Agents register with a name, capabilities, and skills so others can discover them
- They discover each other by skill or tag for dynamic task routing
- They exchange messages (direct, broadcast, or channel-based) to coordinate, with importance levels (
low/normal/high/urgent) and optional ack - They poll their inbox with a blocking wait (
comm_poll) so mid-flight peer signals are consumed without busy-looping - They share state (a key-value store with atomic CAS) for locks, flags, and progress
- They log activity events (commits, test results, file edits) to a shared feed
- They detect stuck agents — alive (heartbeat OK) but not making progress
- They serialize file edits via the system-layer
file-coordhook (see below) so parallel agents on shared files cannot clobber each other - A web dashboard shows everything in real time, including an Activity Feed tab
It works with any agent that supports MCP (stdio transport) or can make HTTP requests (REST API).
Why hooks, not just MCP tools
The MCP tools (comm_state, etc.) give agents the primitives to coordinate, but they don't enforce coordination — the agent has to remember to call them. Our bench measured what happens when you rely on the model's discretion: even with strict procedural prompting, Claude follows the protocol on the first claim cycle then drifts back to "be helpful, finish the task." Soft coordination is unreliable.
The fix is a pair of PreToolUse hooks shipped in scripts/hooks/: file-coord intercepts every Edit/Write/MultiEdit and claims the file via REST POST /api/state/file-locks/<path>/cas (blocks the edit if another agent holds the lock); bash-guard intercepts git commit, git push, npm install, npm test, builds, migrations, and dev-server starts and blocks/warns when they would conflict with another session's WIP. The protocol becomes infrastructure, not a prompt the agent might ignore.
The bench's headline pilot is multi-term-commit — directly modeling the daily pain of two terminal sessions on the same project. Session A edits two files but doesn't commit. Session B then edits two other files and runs git commit -am "my work". Without the hook, B's commit silently includes A's WIP. With the hook, B's commit is blocked at the bash layer with an actionable message, and B reacts (selective staging, restore, or coordinate). Bench result:
The hook is faster AND cheaper, not just safer. Reason: when agents lack coordination on shared workspaces, they read stale state, get confused mid-task, retry, and re-think. Serializing access and surfacing the conflict early removes that wasted thinking. Run npm run setup to install both hooks automatically; see Setup → File Coordination for manual install on Claude Code, OpenCode, or any custom MCP client. See bench/README.md for the measurement methodology.
How agent-comm fits together
agent-comm is a single Node process that exposes three transports — MCP stdio (for AI hosts), REST + WebSocket (for hooks, dashboards, custom scripts) — backed by a SQLite database in WAL mode. Hooks installed in your Claude Code (or other host) settings call the REST endpoint at localhost:3421 to claim file locks, query who-edited-what, and broadcast presence. The dashboard UI at the same port is a live view of every agent, message, channel, and shared-state entry. Multiple AI hosts can connect simultaneously and see the same world.
Quick start
Install from npm
Or clone from source
Option 1: MCP server (for any MCP-compatible AI host)
agent-comm runs as a stdio MCP server, so any MCP-compatible host can use it. Tested hosts include Claude Code, Cline, OpenCode, Cursor (read-only state), Windsurf, Codex CLI, Aider, and Continue.dev. Adapter recipes for each are in docs/SETUP.md.
Generic MCP config:
Add this to your host's MCP config file (the path varies by host —
~/.claude.json for Claude Code, ~/.config/opencode/config.json for
OpenCode, ~/.cursor/config.json for Cursor, etc. — see the per-host
sections in docs/SETUP.md).
The dashboard auto-starts at http://localhost:3421 on the first MCP connection regardless of which host is connected.
Option 2: Standalone server (for REST/WebSocket clients)
Option 3: Automated setup (Claude Code)
Registers the MCP server in ~/.claude.json, installs the hook scripts (lifecycle + file-coord + bash-guard), and configures permissions. Other hosts: see docs/SETUP.md for the per-host integration recipes — every host that supports pre-tool-call hooks can use the same file-coord.mjs script unchanged.
MCP tools (7)
REST API
All endpoints return JSON. Loopback only: foreign Host/Origin headers get 403, request bodies must be application/json, no wildcard CORS. See full API reference for details.
Agent visibility and status
comm_agents with action: "heartbeat" accepts an optional status_text parameter, letting agents update their visible status in the same call that keeps them online:
Hosts that support lifecycle hooks (Claude Code, OpenCode, future Cursor/Codex when they ship hook APIs) get automatic heartbeats, registration, and status via the lifecycle hook scripts shipped in scripts/hooks/. Subagents spawned by the Agent tool inherit the same registration via SubagentStart, so they appear on the dashboard alongside the main session. Hosts without hook support (Cursor, Windsurf, Aider as of 2025) can still use the MCP tools — agents must call comm_register and comm_agents heartbeat from the host's instructions file. Custom MCP clients or scripts can call the REST endpoints or use comm_heartbeat directly to show live progress.
The REST endpoint GET /api/agents/:id/heartbeat returns agent liveness info (status, heartbeat age in ms/s, status text) for external monitoring.
Communication patterns
Direct messaging
Shared state with CAS (distributed locking)
Dashboard
The web dashboard auto-starts at http://localhost:3421 and shows agents, messages, channels, shared state, and the activity feed in real time. See the Dashboard Guide for all views and features.
Testing
Environment variables
Documentation
- Setup Guide — installation, client setup (Claude Code, OpenCode, Cursor, Windsurf), hooks
- Architecture — source structure, design principles, database schema
- Dashboard — web UI views and features
- Changelog
License
MIT — see LICENSE
Source: README.md at commit 113b14d
Tools
0Version history
2- v1.3.12LatestOct 1, 2026
- v1.3.11Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts