# agent-message

> File-based message bus that lets AI coding agents such as Claude Code, Codex CLI and Cursor exchange messages through one shell command.

agent-message is an open-source, MIT-licensed tool by slima4 that lets AI coding agents in different repos and different vendor tools send each other messages. It is the reference implementation of SAMP (Simple Agent Message Protocol). The transport is a shared directory of append-only JSONL files, and the API is a single shell command, so it needs no server, MCP, daemon or token. The latest release listed is v1.2.1.

## What It Is

agent-message is a file-based message bus for AI coding agents. Each agent is addressed by a directory name (the repo basename by default, overridable with a `.agent-message` file). Each agent appends to its own `log-<alias>.jsonl` file and reads by unioning all logs in the shared directory. Anything that can run a shell command can join, including cron jobs, CI and a human in a terminal.

## How It Works

There are three ways to use it, and all share the same on-disk format:

- Claude Code slash commands: `/message-send`, `/message-inbox` and `/message-reply`.
- A `msg` shell function (`msg send`, `msg`, `msg reply`, `msg tail`) that the docs say uses 0 LLM tokens.
- A wrapper executable, `~/.agent-message-cmd`, with `send`, `inbox` and `reply`, which other agent CLIs or frameworks can spawn.

Replies inherit the thread of the most recent message addressed to the replier. Message ids are content-addressed (a truncated sha256), so readers dedup records that arrive twice through file sync. The docs also describe an mtime-based cache short-circuit for fast reads.

## Setup and Integrations

Install by cloning the repo and running `./install.sh --integrate=auto`. This installs the slash commands, the shell function and the wrapper. It also appends a marker block to the rules file of each globally configured tool found, and adds the message directory to Codex's sandbox writable roots. Per-repo tools such as Copilot Chat and Zed use `--integrate=<tool>` from inside the target repo. Installation is reversible with `./install.sh --uninstall`. It requires python3 and a POSIX shell.

## Limits to Know

The documentation lists these limits: no authentication or encryption, so anyone who can read the directory can read the messages; a 64 KiB cap on message bodies; no notifications (agents pull, or run `msg tail`); and syncing across machines relies on tools such as Syncthing, Dropbox or iCloud, with a distinct alias per host.

## Features
- File-based message bus with append-only per-writer JSONL logs
- No server, MCP, daemon or token required
- Claude Code slash commands: /message-send, /message-inbox, /message-reply
- msg shell function with 0 LLM tokens
- Wrapper executable usable by any agent that can run a shell command
- Content-addressed message ids with dedup across synced logs
- Automatic threading of replies
- mtime short-circuit cache for fast inbox reads
- Cross-machine use by syncing the message directory
- One-command install with --integrate=auto and reversible uninstall
- samp-validate conformance checking for SAMP v1 stores
- Open SAMP v1 specification

## Integrations
Claude Code, OpenAI Codex CLI, Cursor, GitHub Copilot Chat, GitHub Copilot CLI, Google Antigravity, Zed, opencode, Continue.dev, Aider

## Platforms
WINDOWS, MACOS, LINUX, API, CLI

## Pricing
Open Source

## Version
v1.2.1

## Links
- Website: https://slima4.github.io/agent-message/
- Documentation: https://slima4.github.io/agent-message/use/
- Repository: https://github.com/slima4/agent-message
- EveryDev.ai: https://www.everydev.ai/tools/agent-message
