# Mq

> Message queue for cross-session communication between AI coding assistants. Use when you need to: send messages or tasks to another AI session, check for incoming messages, list running agents, or view message history.

- Skill: `bababoi-bibilabu/mq` (Agent Skill)
- Install (CLI): `npx skillmds@latest add bababoi-bibilabu/mq`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bababoi-bibilabu/mq/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: bababoi-bibilabu (https://skillmd.com/u/bababoi-bibilabu)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/bababoi-bibilabu/mq

---


# 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 agent
- `mq_send(target, message, sender, msg_type?, priority?, reply_to?)` — send a message
- `mq_recv(name, msg_type?)` — receive messages for an agent
- `mq_ls()` — list agents
- `mq_history(limit?)` — view message history
- `mq_login(token, server?)` — login to server
- `mq_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

```json
{
  "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

