Agmsg lets CLI AI agents message each other locally

Agmsg is a new bash and SQLite tool that lets CLI AI agents such as Claude Code, Codex, and Gemini CLI send messages to one another through a shared local database. The project uses no daemon or network and supports real-time or between-turns delivery depending on the agent.

Agmsg lets CLI AI agents message each other locally

Agmsg is a new cross-agent messaging tool for CLI-based AI assistants. The project lets Claude Code, Codex, Gemini CLI, and other command-line agents send messages through a shared SQLite database, without a daemon, network service, or separate backend, according to the project’s Show HN post.

The tool is designed for agents that already run in a terminal and interact through shell commands. After installation, the user restarts Claude Code or Codex so each agent picks up the new skill, then runs the command name - /agmsg in Claude Code or $agmsg in Codex - to join a team and start messaging.

⚡ New to this?

This is a messaging system for AI agents that work from the command line. A CLI, or command-line interface, is the text-based way you control software in a terminal, and SQLite is a small local database used here to store messages. For non-experts, the key point is that it lets multiple AI tools coordinate with each other without sending data to a remote server.

🦞 OpenClaw angle

If you build self-hosted agent workflows, this is a useful model for local coordination: keep agent state in SQLite, not in a custom service. If you want real-time handoffs, design one agent to watch for updates and another to poll between turns, then provide a fallback mode when the watcher fails. For security-sensitive setups, treat the shared database and project hooks as part of your trust boundary and review them before installing anything from a shell script.

According to the author, once two agents join the same team, they can exchange messages directly. The project page says natural-language commands such as “Send alice a message saying the deploy is done,” “check my messages,” and “who’s on the team” are handled by the agent after setup.

The source post includes a demo where two Claude Code instances in monitor mode play tic-tac-toe against each other with no human in the loop. It also describes a second example where Claude Code asks Codex for a code review and receives the response over agmsg.

Agmsg stores messages in a single SQLite database using WAL mode, which stands for write-ahead logging. The author says that means multiple readers and one writer can operate without conflicts. The project is built with bash and sqlite3, and does not require Python.

Delivery is configurable per project. The default mode for Claude Code is monitor, which uses a SessionStart hook and a Monitor tool to stream messages in about five seconds, while Codex defaults to turn mode, where a Stop hook checks the inbox between assistant turns.

There is also a both mode, which uses monitor as the primary path and turn mode as a fallback if the watcher fails, and an off mode for manual message checks only. The project page says these settings live in each project’s local Claude configuration and can be changed with /agmsg mode monitor, /agmsg mode turn, /agmsg mode both, or /agmsg mode off.

The post says team identity is based on the pair of agent name and team name, and that the same agent can re-join from different projects without becoming a duplicate identity. It also says users can create multiple identities for one project, rename teams, or reset a project’s registration without leaving the team entirely.

Installation is presented as a one-line bash command that downloads and runs a setup script from GitHub, or as a clone-and-install path for users who want to inspect the code first. The repository also includes uninstall scripts, update support, and tests using bats-core, according to the project page.

The code and data live under a skill directory that includes SKILL.md, scripts, templates, team configs, and the SQLite message store. The author says the design avoids a daemon and keeps everything local, with direct filesystem access used for message delivery and team state.

Source: HN Show HN ↗

More from OpenClaw News