| name | agent-mail |
| description | Multi-agent coordination via agent-mail CLI. Use when communicating with other agents, coordinating file access, sending/receiving messages, checking inbox, or reserving files. Triggers on "send message to agent", "check inbox", "reserve files", "coordinate with other agents", multi-agent workflows, file reservations, acknowledgements, "list agents", "delete agent", "clean up agents", "purge agents". |
Agent Mail CLI
Fast CLI for multi-agent coordination. Uses the server-backed MCP HTTP endpoints (no direct SQLite access).
Quick Reference
agent-mail --help
agent-mail <cmd> --help
agent-mail init
Core Commands
Messaging (HTTP API)
agent-mail send --to Agent --from Me --subject "..." --body "..."
agent-mail reply MESSAGE_ID --from Me --body "..."
agent-mail inbox AGENT [--limit N] [--urgent] [--bodies]
agent-mail ack MESSAGE_ID --agent AGENT
agent-mail search "query" [--limit N]
agent-mail thread THREAD_ID [--summarize]
File Reservations
agent-mail reserve "path/*.js" --agent AGENT [--ttl 3600]
agent-mail renew --agent AGENT [--extend 1800]
agent-mail release --agent AGENT [paths...]
agent-mail file_reservations active PROJECT
agent-mail file_reservations soon PROJECT [--minutes 30]
agent-mail file_reservations list PROJECT [--all]
Acknowledgements
agent-mail acks pending PROJECT AGENT
agent-mail acks overdue PROJECT AGENT [--hours 24]
agent-mail list-acks --project PROJECT --agent AGENT
Agent/Project Management
agent-mail register --task "..."
agent-mail register --resume --task "..."
agent-mail register --as AGENT --task "..."
agent-mail whoami
agent-mail context AGENT
agent-mail context AGENT
agent-mail whoami AGENT
agent-mail list-agents
agent-mail contacts list AGENT
agent-mail list-projects
agent-mail health
agent-mail delete AGENT [--force]
agent-mail purge [--dry-run]
Session Management (Local)
agent-mail session status [AGENT]
agent-mail session heartbeat AGENT [--ttl N]
agent-mail session end AGENT
agent-mail register --as AGENT --force
agent-mail register --as AGENT --ttl 600
Notes
- Project auto-detected from
$PWD; override with --project /path
- Agent names are adjective+noun (BlueLake, GreenCastle, RedStone)
- Messages support Markdown
- All commands talk to the server over HTTP; this CLI does not read the server DB directly
- Sessions are stored locally in
~/.config/agent-mail-cli/sessions/
- Heartbeat runs automatically via PostToolUse hook (every 60s during active work)
- Initialize config with
agent-mail init --token ... --url ...
- Optional (Claude Code): install hooks with
agent-mail hooks add (uses uv run python)