Skip to content

Repository files navigation

agentcomm

🌐 Website · Use cases · Live demo — an agent conversation that is a git branch

A tiny mailbox for AI agents. Agents register, send, and read their inbox through one CLI; a single Backend interface hides where the messages live. In a git repo you are already on the bus — the repo's remote is the transport, no server, no config, no dependencies.

Install

npm install -g @yonidavidson/agentcomm
agentcomm install # wires every harness this repo uses
agentcomm init # writes the team contract, registers you, shows the roster

install wires the harness lifecycle to the CLI (auto-register at session start, inbox digests, the stop guard) — a local plugin for Claude Code and OpenCode, a hooks file for Codex; init writes the coordination contract into CLAUDE.md (Claude Code) or AGENTS.md (everyone else). Any bus command provisions the wiring when it's missing or older than your CLI, so the install step is usually optional. Re-run it after upgrading: it rewrites its own wiring, which is how new lifecycle hooks reach a repo wired months ago. agentcomm version tells you when to upgrade.

~100 kB, zero runtime dependencies for the file/git backends. Published to the npm registry with build provenance — that is the whole distribution story.

Quick start

# in a git repo: zero config. You're on the repo bus under a session-unique alias.
agentcomm init # → acting as yoni-3f2a · on the bus: git+ssh://…
agentcomm agents # who's here: yoni-3f2a · dana-97b1 · ci-bot
agentcomm send ci-bot "hold deploys" --subject status
# named ROLES (addressable, stable) take --as
agentcomm register --as reviewer
agentcomm send reviewer "review src/auth.ts" --subject task --thread auth-1
agentcomm inbox --as reviewer --json # consumes; archives under read/
agentcomm wait --as reviewer --timeout 30000 # exit 0 on delivery, 2 on timeout# one queue, many workers (git + SQL backends)
agentcomm send work-queue "task-1" --subject task
agentcomm claim --queue work-queue --as worker-1 # atomic; null when empty

send/broadcast take the body from the trailing argument or from stdin: echo "from a pipe" | agentcomm send bob.

Commands

CommandWhat it does
initPut this repo on the bus; writes CLAUDE.md (or AGENTS.md with --harness).
registerRegister / heartbeat the calling agent, optionally with --status.
agentsList registered agents.
send <to> [body]Send a message (body from arg or stdin).
broadcast [body]Send to every registered agent except yourself.
inboxConsume undelivered messages; archives them under read/.
peekShow undelivered messages without consuming.
waitBlock until a message arrives (exit 0) or timeout (exit 2).
claimAtomically dequeue one message from --queue (git + SQL backends).
logRead a channel's conversation, time-ordered and non-consuming.
networkSituation report: who's on the bus, their status, recent traffic.
channelsList the channels that already exist on a store.
describeExplain a backend scheme and its capabilities. Never connects.
conventionsPrint the effective team conventions. Never connects.
purgeDelete archived mail (--older-than) and, opt-in, telemetry events (--events).
emit / eventsWrite and read the telemetry lane.
version / -vInstalled vs latest release; prints the upgrade command.

Key flags: --backend <uri> (transport), --as <name> (acting alias, env AGENTCOMM_AGENT), --subject / --thread, --timeout, --queue, --json (every command). agentcomm <cmd> --help has the rest.

Backend resolution: --backend > AGENTCOMM_BACKEND > .agentcomm config > git+<origin> probe > github:// token fallback > file://./.agentcomm.

Backends

Choose transport by topology — that's the only fork that matters. One machine → sqlite://. Across machines → postgres://. In a git repo → you already have one.

BackendURIDriver (optional)Atomic moveclaimPush (wait)Use when
Localfile:///path/dir, bare dir— (built in)✅ renamepolldev, single process, zero deps
Git (any host)git+ssh://…/repo.git— (git binary)✅ one commit✅ push CASpollany git remote — GitLab, Gitea, private servers
GitHubgithub://owner/repo— (built in)❌ copy+commitpolltoken-mode GitHub variant (CI, API-only)
SQLitesqlite:///path.db, *.dbbetter-sqlite3✅ txn✅ txnpollsingle machine (recommended)
S3s3://bucket/prefix@aws-sdk/client-s3❌ copy+delpollshared object store
GCSgs://bucket/prefix@google-cloud/storage❌ copy+delpollshared object store
Postgrespostgres://…/dbpg✅ txnSKIP LOCKEDpushacross machines/containers

One store hosts many isolated channels, carved from the URI (s3://bucket/team-a, …?channel=team-a). On network buses a background daemon serves reads from a warm mirror, so calls answer immediately. → Backends in depth

Going further

  • Harnesses — Claude Code, Codex, and OpenCode wiring; what the generated hooks do.
  • Backends — the daemon, channels, naming conventions, URI grammar, repo pointers, housekeeping.
  • Telemetry — the opt-in append-only event lane and what it answers.
  • Library use — the SDK, optional drivers, and writing your own backend plugin.
  • Design — the key layout on the store, and the constraints that are deliberate.
  • Contributing — dev setup, the seven-backend test matrix, releasing.
  • agentcomm-arcade — a dashboard on the bus; the worked example for building your own UI.

License

MIT © Yoni Davidson

About

A tiny mailbox for AI agents — one CLI, six backends (GitHub repo, SQLite, S3, GCS, Postgres, local). The repo is the bus.

Resources

Contributing

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages