Communication Layer for AI Agents
Agents need a mailbox. Send a message, the recipient gets it when they come online. mq9 is RobustMQ's communication layer for AI Agents — async mailbox, broadcast, priority queue. Any NATS client connects directly.
People have email, Slack, WeChat. You send a message, the recipient reads it when available — no need to be online at the same time.
What about Agent to Agent?
Today, Agent A sends a message to Agent B. B is offline — the message is gone. Every team works around this with Redis pub/sub, database polling, or homegrown queues. It works, but it's a workaround.
mq9 solves it directly: send a message, the recipient gets it when they come online.
Async point-to-point
Every Agent has its own inbox. Send without knowing if the recipient is online — the message waits. The Agent receives it when it comes back.
nats req '$mq9.AI.MAILBOX.CREATE' '{}'
# → {"mail_id": "agt-001", "token": "tok-xxx"}
nats pub '$mq9.AI.INBOX.agt-001.normal' \
'{"from":"agt-002","payload":"task done"}'
nats sub '$mq9.AI.INBOX.agt-001.*'Publish once, many receive
An Agent broadcasts an event without knowing who is listening. Interested Agents subscribe themselves. Topology changes are zero-cost.
# Broadcast an event
nats pub '$mq9.AI.BROADCAST.task.available' \
'{"task_id":"t-001","type":"analysis"}'
# Subscribe to all task events
nats sub '$mq9.AI.BROADCAST.task.*'
# Subscribe to anomalies across all domains
nats sub '$mq9.AI.BROADCAST.*.anomaly'Critical messages first
Three priority levels: urgent, normal, notify. Critical instructions are never buried under routine tasks. FIFO within each level.
# Urgent — processed first
nats pub '$mq9.AI.INBOX.agt-001.urgent' \
'{"type":"stop","reason":"anomaly"}'
# Normal — routine tasks
nats pub '$mq9.AI.INBOX.agt-001.normal' \
'{"type":"task","payload":"..."}'
# Notify — background info, no persistence
nats pub '$mq9.AI.INBOX.agt-001.notify' \
'{"type":"heartbeat"}'Sub-Agent sends results to the orchestrator's mailbox. The orchestrator picks up results when ready — no blocking.
One wildcard subscription — the orchestrator automatically tracks every sub-Agent coming online, running, or dying. No registration needed.
Orchestrator broadcasts a task, capable Workers compete to claim it. Queue group ensures each task is handled by exactly one Worker.
Cloud sends instructions to an edge Agent that's offline. Messages wait, then are processed by priority when the edge reconnects.
Agent hits a decision point requiring human judgment, sends to a human's inbox, and resumes when the approval comes back.
Agent A sends a request to Agent B's inbox. B processes when online and replies to A's inbox, matched by correlation_id.
mq9 is built on the NATS protocol. Any NATS client in any language is already an mq9 client. The entire NATS ecosystem works out of the box.
mq9 sits alongside MQTT, Kafka, NATS, and AMQP, sharing the same unified storage layer. Deploy one RobustMQ — all five protocols are ready.
Single-node deployment, one command, Agent mailbox ready.
curl -fsSL https://raw.githubusercontent.com/robustmq/robustmq/main/scripts/install.sh | bash
broker-server start
# Agent gets a mailbox
nats req '$mq9.AI.MAILBOX.CREATE' '{}'