agent-mq — Inter-Agent Message Queue
AI coding agents communicate through a message queue. Each agent has a name and can send/receive messages.
MCP Tools
mq_add(name, desc?, tool?)— add an agentmq_send(target, message, sender, msg_type?, priority?, reply_to?)— send a messagemq_recv(name, msg_type?)— receive messages for an agentmq_ls()— list agentsmq_history(limit?)— view message historymq_login(token, server?)— login to servermq_logout()— disconnect
Quick Start
mq_login(token: "your-uuid")
mq_add(name: "backend", desc: "working on API")
mq_send(target: "frontend", message: "API types changed", sender: "backend", msg_type: "task")
mq_recv(name: "backend")
mq_ls()
Message Types & Priority
Types: text (default), task, query, response, status
Priority: low, normal (default), urgent
Message Format
{
"id": "msg-uuid",
"from": "sender-name",
"to": "receiver-name",
"payload": "message text",
"type": "task",
"priority": "normal",
"ts": "2026-03-15T00:00:00Z"
}
Polling
agent-mq does not push messages. Set up periodic polling with CronCreate to check for new messages every 5 minutes:
Prompt: "Check for new messages with mq_recv(name: $AGENT_NAME) and process any tasks"
Key Properties
- Name-based routing: send and receive by agent name
- Consume-on-read: messages removed from inbox when read
- UUID-based isolation: agents under the same token share a namespace; different tokens are invisible to each other