Skip to content
RobustMQ's Fifth Native Protocol

mq9

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.

Built on NATS · No extra SDK · Ships with every RobustMQ instance

The Problem Today

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.

Today
Agent A
message lost
Agent B offline
mq9
Agent A
📬 mailbox waits
Agent B receives on reconnect

Covers every async Agent communication scenario

📬

Mailbox

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.*'
📡

Broadcast

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'

Priority

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"}'

Six real-world use cases

01

Sub-Agent notifies Orchestrator

Sub-Agent sends results to the orchestrator's mailbox. The orchestrator picks up results when ready — no blocking.

02

Monitor all Agent states

One wildcard subscription — the orchestrator automatically tracks every sub-Agent coming online, running, or dying. No registration needed.

03

Task broadcast with competing consumers

Orchestrator broadcasts a task, capable Workers compete to claim it. Queue group ensures each task is handled by exactly one Worker.

04

Edge Agent offline buffering

Cloud sends instructions to an edge Agent that's offline. Messages wait, then are processed by priority when the edge reconnects.

05

Human-in-the-loop workflows

Agent hits a decision point requiring human judgment, sends to a human's inbox, and resumes when the approval comes back.

06

Async Request-Reply

Agent A sends a request to Agent B's inbox. B processes when online and replies to A's inbox, matched by correlation_id.

No New SDK Required

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.

GoPythonRustJavaJavaScriptC#RubyElixir

Fifth native protocol, same unified storage

mq9 sits alongside MQTT, Kafka, NATS, and AMQP, sharing the same unified storage layer. Deploy one RobustMQ — all five protocols are ready.

MQTTIoT Devices
KafkaStreaming Pipelines
NATSLightweight Pub/Sub
AMQPEnterprise Messaging
mq9AI Agent Communication
Unified Storage Layer

Start Building

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' '{}'