agmsg is a free, open-source messaging tool for CLI AI coding agents. It lets Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, OpenCode, and other supported agents exchange short messages through a shared SQLite store.
It is useful when several coding agents work on the same project and need to pass review requests, file paths, commit SHAs, task status, or short handoff notes. The local CLI workflow requires Bash and SQLite, and agmsg keeps the message history available across sessions.
Features
- Sends short messages between independent CLI AI agent sessions through a shared SQLite store.
- Works with Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Antigravity, OpenCode, Cursor, Grok Build, Hermes, and shell-based agent workflows with different levels of integration.
- Keeps message history across sessions and lets agents replay earlier team conversations.
- Supports monitor, turn-based, combined, and manual delivery options where the connected agent supports them.
- Lets one project use named roles through
actasand release them throughdrop. - Can launch supported peer agents with
spawnand close spawned peers withdespawn. - Supports short handoffs that reference file paths, commit SHAs, issue numbers, and saved artifacts.
- Offers npm, direct-script, and Claude Code plugin installation paths for the CLI tool.
Use Cases
- Send a code review request from Claude Code to Codex and return a concise review summary.
- Pass a file path, issue number, commit SHA, or task status between coding agents.
- Split planning, implementation, review, and analysis across named agent roles.
- Launch a reviewer or implementation peer from the current session with a boot prompt.
- Keep short coordination messages available when agent sessions restart.
- Run several agents in one local team while each agent keeps its own CLI session and model context.
How agmsg Works
agmsg stores team messages in SQLite. Each registered agent has an identity inside a named team, and the installed skill reads or writes messages for that identity.
Automatic delivery depends on the connected agent and selected delivery mode. Claude Code can use monitor delivery for near-real-time message pickup. Codex can also use monitor delivery through agmsg’s app-server bridge, while turn-based delivery checks for messages between interactions.
Messages work best as concise handoffs. Store long diffs, logs, generated files, or reports on disk and send a short note that points the recipient to the relevant file or commit.
Supported Agents
| Agent | Command / Integration | Notes |
|---|---|---|
| Claude Code | /agmsg | Supports monitor, turn, both, and manual delivery. |
| Codex | $agmsg | Supports monitor through an app-server bridge, plus turn and manual delivery. |
| GitHub Copilot CLI | /agmsg | Supports turn and manual delivery. |
| Gemini CLI | $agmsg | Uses the installed Agent Skill workflow. |
| Antigravity | $agmsg | Uses the installed Agent Skill workflow. |
| OpenCode | $agmsg | Supports monitor through the external opencode-sentinel plugin, plus turn and manual delivery. |
| Cursor, Grok Build, Hermes | Agent-type support | Integration details vary by agent type and runtime. |
How To Install and Use agmsg
Install agmsg via NPM:
npx agmsgYou can also install it globally:
npm i -g agmsg
agmsg installClaude Code users can install agmsg from its plugin marketplace entry:
/plugin marketplace add fujibee/agmsg
/plugin install agmsg@fujibee-agmsg
/reload-plugins
/agmsgFor a source checkout, clone the repository and run the installer:
git clone https://github.com/fujibee/agmsg.git
cd agmsg
./install.shAfter installation, restart the coding agent so it can detect the skill. Start agmsg inside the project with the command for your agent:
# Claude Code and GitHub Copilot CLI
/agmsg
# Codex, Gemini CLI, and Antigravity
$agmsgThe first run asks for a team name and agent name. After registration, you can use natural-language requests such as:
send alice a message saying the deploy is donecheck my messageswho's on the teamSpawn and Despawn Peer Agents
spawn starts another supported CLI agent as an independent peer and assigns it a role. A boot prompt can send the new peer directly into a task during its first turn.
/agmsg spawn codex reviewer
/agmsg spawn claude-code alice --window
/agmsg spawn codex reviewer --boot-prompt "review the diff on this branch"Current spawn support includes Claude Code, Codex, Grok Build, Cursor, Gemini, Antigravity, Copilot, and OpenCode.
Use despawn for peers that agmsg started:
/agmsg despawn reviewer
/agmsg despawn alice --forceDelivery Modes
| Mode | How It Delivers Messages | Best Use |
|---|---|---|
monitor | Uses a live watcher or agent-specific bridge for message pickup. | Sessions that need near-real-time coordination. |
turn | Checks the inbox between agent interactions. | Agents that work well with turn-based polling. |
both | Uses monitor delivery with turn-based fallback where supported. | Claude Code workflows that need a fallback path. |
off | Leaves message checks to manual commands. | Minimal setups and explicit inbox checks. |
Inspect or change the current mode with these commands:
/agmsg mode monitor
/agmsg mode turn
/agmsg mode both
/agmsg mode off
/agmsg modeMode availability varies by agent. GitHub Copilot CLI supports turn and manual delivery. OpenCode can use monitor delivery through the opencode-sentinel plugin. Codex monitor uses an app-server bridge and changes how interactive Codex sessions start.
Codex Monitor Mode
Codex monitor delivery uses an app-server bridge because Codex does not expose Claude Code’s Monitor tool. agmsg can direct interactive Codex launches through a monitor shim, then inject incoming agmsg messages into the current Codex thread.
This mode changes the interactive Codex launch path. The Codex sandbox also needs write access to agmsg runtime directories such as db, teams, and run. Users who prefer the simpler setup can use turn-based or manual delivery.
Multiple Roles With actas
actas lets one project switch to another named role, which is useful for role-based workflows such as architecture review and requirements analysis.
/agmsg actas tech-lead
/agmsg actas biz-analyst
/agmsg drop biz-analystRole ownership is exclusive across sessions. agmsg prevents two sessions from claiming the same role at the same time.
Quick Reference
| Command | Purpose |
|---|---|
/agmsg | Check inbox across teams. |
/agmsg history | Show message history. |
/agmsg team | List team members. |
/agmsg send <agent> <message> | Send a message to another agent. |
/agmsg mode <monitor|turn|both|off> | Change delivery mode. |
/agmsg actas <name> | Use another role in the project. |
/agmsg drop <name> | Release a role. |
/agmsg spawn <type> <name> | Launch a supported peer agent. |
/agmsg despawn <name> | Close a peer that agmsg started. |
/agmsg version | Show the installed version. |
/agmsg reset | Clear project registration. |
Shell Scripts
| Script | Purpose |
|---|---|
send.sh <team> <from> <to> "<message>" [--force] | Write a message to the team store. |
inbox.sh <team> <agent_id> | Read unread messages. |
history.sh <team> [agent_id] [limit] | Show message history. |
team.sh <team> | List team members. |
whoami.sh <project_path> <type> | Resolve the current identity. |
delivery.sh set <mode> <type> <project_path> | Set a delivery mode. |
delivery.sh status [<type> <project_path>] | Show delivery status. |
reset.sh <project_path> <type> [agent_id] | Clear registration data. |
Storage and Data Handling
The default CLI workflow stores messages in a local SQLite database. Message history survives agent sessions, and the AGMSG_STORAGE_PATH environment variable can point the SQLite store to another directory.
AGMSG_STORAGE_PATH=/tmp/agmsg-sandbox ./scripts/send.sh myteam alice bob "hi"agmsg messages are plain text. Connected coding agents continue to use their own model providers under the terms and data-handling rules of those services.
CLI and Desktop App
The agmsg CLI is the direct option for Agent Skill workflows and terminal automation. The project also provides a desktop app for macOS and Windows with terminal panes and agent controls in one application.
agmsg, MCP, Subagents, and Orchestration Tools
| Approach | Primary Role |
|---|---|
| agmsg | Passes short messages between peer CLI agent sessions and keeps a shared message history. |
| MCP | Connects an AI client to tools, data sources, services, and external capabilities through a standard protocol. |
| Built-in subagents | Lets one host agent delegate work to managed agent processes inside its own orchestration model. |
| Multi-agent orchestration tools | Coordinate tasks, workspaces, queues, dashboards, or execution state across multiple workers. |
Alternatives and Related Tools
- Best Open-Source MCP Servers: Browse MCP servers for tool access, context retrieval, and external service integration.
- 10 Best Agent Skills for Claude Code & AI Workflows: Compare Agent Skills for Claude Code, Codex, Gemini CLI, and related agent workflows.
- 7 Best CLI AI Coding Agents: Compare terminal-first AI coding agents for coding, review, and automation work.
- Claude Code Commands Cheat Sheet: Review Claude Code commands, flags, MCP controls, and workflow commands.
- Claude Peers MCP Server: Compare agmsg with an MCP-based messaging option for Claude Code sessions.
- Manaflow: Explore a dashboard-style approach to running coding agents in parallel.
Pros
- Local SQLite messaging keeps the core CLI architecture lightweight.
- Works across several popular CLI coding agents.
- Persistent history supports handoffs across agent sessions.
- Spawn, roles, and delivery modes support more complex multi-agent workflows.
- Multiple installation paths support npm, source checkout, and Claude Code plugins.
Cons
- CLI setup requires Bash and SQLite.
- Delivery mode support differs across agent types.
- Codex monitor changes the interactive Codex launch path and has extra setup considerations.
- Messages are designed for concise text handoffs, while large artifacts need file references.
FAQs
Q: What is agmsg?
A: agmsg is an MIT-licensed cross-agent messaging tool for CLI AI coding agents. It uses a shared SQLite store for short messages between registered agent sessions.
Q: Can agmsg connect Claude Code and Codex?
A: Yes. Claude Code and Codex can join the same agmsg team and exchange messages. Codex supports turn-based delivery and also has a monitor option that uses an app-server bridge.
Q: Can agmsg launch another coding agent?
A: Yes. The spawn command can launch supported peer agents such as Codex or Claude Code, assign a role, and optionally send a boot prompt for the first task.
Q: Does agmsg work with MCP?
A: Yes. agmsg can run alongside an MCP setup. agmsg handles peer messaging, while MCP handles tool and data connections for compatible AI clients.
Q: Does agmsg keep message history?
A: Yes. Messages stay in the SQLite store after sessions end, and the history command can replay earlier team conversations.
Q: Can agmsg handle large files or long outputs?
A: The message layer is designed for concise text. Save large diffs, logs, or artifacts to disk and send a file path, commit SHA, or other short reference to the receiving agent.
Last Updated: Aug 20, 2026










