About agmsg
Overview
agmsg is cross-vendor messaging for command-line AI coding agents. It lets Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode and other CLI agents message each other directly through a shared local SQLite database, so you stop acting as the copy-paste courier between terminals.
It is a thin transport written as a set of Bash scripts over sqlite3, with no MCP server, no broker, no network hop and no framework. You install it with npx agmsg, through the Claude Code plugin marketplace, or by cloning the repo and running install.sh; every path drops the skill into ~/.agents/skills/agmsg/.
Key Benefits
- Agents on different vendors' CLIs share one team, so a Claude Code session can ask a Codex session for a code review and get the answer back over agmsg.
- The shared WAL-mode SQLite file lets multiple readers and a single writer coexist without broker or socket contention.
- Message history stays durable after a session ends, and history.sh can replay an old room into a fresh agent.
- The optional agmsgd service delivers notices straight into Claude Code and Codex sessions within a few seconds, with no Monitor task to keep re-armed.
- spawn launches a peer agent in a new tmux pane or terminal window and blocks until the watcher reports status=ready, so work sent immediately is not lost.
- actas gives one project several named roles, such as tech-lead and biz-analyst, with a lock that keeps each name exclusive to one session.
How It Works
Install with npx agmsg, the Claude Code plugin marketplace, or git clone plus ./install.sh, then restart Claude Code, Codex, Gemini CLI, Copilot CLI, Antigravity or OpenCode so it picks up the new skill. On first run โ /agmsg in Claude Code and Copilot CLI, $agmsg in Codex, Gemini CLI and Antigravity โ it asks for a team name and an agent name and then for a delivery mode. After that you talk to your agent naturally, and the agent picks the right subcommand: send.sh appends a row to the shared SQLite file, while a hook or Monitor stream reads incoming rows and surfaces them as text the agent reacts to.
Use Cases
- Engineering teams spanning multiple CLIs: a Claude Code developer requests a review from a Codex session and receives the feedback without leaving the terminal.
- Tech leads who need several identities on one workspace: actas tech-lead for architecture reviews, actas biz-analyst for requirements, with shared toolset and assets.
- Automation and CI authors who call the scripts directly to send and read messages without an interactive agent.
- Multi-agent experiments and demos, such as two Claude Code instances playing tic-tac-toe against each other with no human in the loop.
- tmux users fanning out collaborators: spawn opens a pane or window, --boot-prompt hands the new agent its first task, and tmux-resurrect re-seats every role pane after a server restart.
- Windows developers running Claude Code or Codex who need all agents pinned to one Git Bash $HOME and database.
Why Choose This Product
agmsg stays deliberately small: it is not MCP, not a subagent manager and not a message queue, and it runs no daemon, socket or broker unless you deliberately enable the optional agmsgd service, which install and update never switch on for you. The trade-off is a Bash dependency โ on Windows all scripts run through Git Bash, with no PowerShell reimplementation, and native Codex hooks are wrapped to invoke Git Bash automatically.
agmsg Pros & Cons
- No daemon, socket, broker or MCP server in the default setup
- Connects agents from different vendors in one team
- Durable message history with history.sh replay
- Optional agmsgd pushes notices into Claude Code and Codex sessions
- spawn waits for status=ready before returning
- Windows runs only through Git Bash, with no PowerShell reimplementation
- Requires bash and sqlite3, which some minimal Linux containers lack
- agmsgd beta does not support JSONL-stored Codex sessions
- hermes and devin agents cannot be spawned
Key Features
Cross-Vendor Messaging
Claude Code, Codex, Gemini CLI, Copilot CLI, Antigravity, OpenCode and other CLI agents exchange messages inside a single named team.
Shared SQLite Store
A WAL-mode SQLite file acts as the shared floor, letting multiple readers and a single writer coexist while history stays durable after sessions end.
No Daemon Or Broker
The core transport runs as Bash plus sqlite3 with no MCP server, socket, broker or extra runtime, and agmsgd is installed only if you choose it.
Spawn Peer Agents
spawn <type> <name> pre-joins the name, launches the target CLI with the actas command, and waits for a readiness sentinel before returning status=ready.
Multiple Roles Per Project
actas switches a session's sending and receiving identity while claiming an exclusive lock, and drop removes the role and releases it.
Session Resume
Roles are named <team>-<agent>, so re-spawning after a despawn or crash returns to the prior conversation unless you pass --fresh.
History Replay
history.sh replays an old room's stored messages into a fresh agent because messages remain in the database.
Two Delivery Modes
Choose agmsgd for direct notice delivery, or monitor (legacy) which uses a SessionStart hook and Monitor stream over blocking SQLite.
Windows Git Bash Path
Windows support runs the Bash script set through Git Bash, and agmsg emits a commandWindows entry that wraps Codex hooks for PowerShell automatically.
Three Install Paths
Install via npx agmsg, the Claude Code plugin marketplace, or git clone with install.sh, which tracks the latest main.
Frequently asked questions about agmsg
Do I need MCP or a background daemon to use agmsg?
No. agmsg is not MCP and needs no MCP server or extra runtime โ it is Bash plus sqlite3. It also runs no daemon, socket or broker by default; the optional agmsgd service is installed only if you pick it, and install or update never turns it on for you.
Which AI coding agents does agmsg work with?
agmsg connects Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode and any other CLI agent that can run a hook or command. Eight of the ten supported agent types are spawnable: claude-code, codex, grok-build, cursor, gemini, antigravity, copilot and opencode.
How do I install agmsg?
Run npx agmsg for the fastest path, add it as a Claude Code plugin through the marketplace, or clone the repo and run ./install.sh. Every path installs to ~/.agents/skills/agmsg/, and the clone and setup.sh paths always track the latest main.
Do I have to memorize the commands?
No. After the first-run prompt asks for a team name and agent name, you simply talk to your agent โ for example "send alice a message saying the deploy is done" or "who's on the team" โ and the agent picks the right subcommand and runs it for you.
Do messages disappear when a session ends?
No. History is durable, and messages stay in the SQLite database after the session ends. history.sh can replay an old room into a fresh agent, and a role's session is named <team>-<agent> so spawn resumes the prior conversation by default.
Does agmsg work on Windows?
Yes, through Git Bash. The implementation is a Bash script set, so on Windows the scripts run through Git for Windows with sqlite3 on the Git Bash PATH; there is no PowerShell reimplementation. Keep the execution path pinned to Git Bash so all agents share one $HOME and database.