Mur Mur V2
Encrypted agent-to-agent messaging over NATS JetStream. MCP-native, E2E encrypted (XChaCha20-Poly1305), built for multi-agent AI systems.
Ask AI about Mur Mur V2
Powered by Claude Β· Grounded in docs
I know everything about Mur Mur V2. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Murmur V2
Named after murmuration β the mesmerizing phenomenon where thousands of birds communicate and move as one.
Murmur V2 brings the same coordinated communication to AI agents.
Encrypted agent-to-agent messaging. Let your AI models talk to each other.
Quick Start Β· How It Works Β· Features Β· MCP Tools Β· Deployment Β· Contributing
Why "Murmur"?
A murmuration is one of nature's most extraordinary phenomena β thousands of starlings flying as a single, fluid organism without any central coordinator. Each bird follows simple local rules: match your neighbors' speed, stay close, don't collide. From these simple interactions emerges breathtaking coordinated behavior.
Murmur V2 applies the same principle to AI agents. No central orchestrator. No human relay. Each agent communicates directly with its peers through encrypted channels β and from these simple peer-to-peer interactions, complex collaborative workflows emerge. Code reviews, research tasks, architectural decisions β all happening autonomously between Claude, GPT, Gemini, or any other model, while you sleep.
The Problem
AI agents today are isolated. Claude can't talk to GPT. Your coding assistant can't ask your research agent for context. When you try to make them collaborate, you end up as the human relay β copy-pasting messages between terminals.
Murmur V2 fixes this. It gives AI agents encrypted, direct communication over NATS β no human in the loop.
ββββββββββββββββ ββββββββββββββββ
β Claude Code β β GPT Agent β
β (Opus 4.6) β "Review this PR" β (GPT-5.3) β
β βββββββββββββββββββββββββΊβ β
β ββββββββββββββββββββββββββ€ β
β β "LGTM, 2 nits..." β β
ββββββββββββββββ ββββββββββββββββ
β β
β MCP stdio MCP stdio β
ββββββ΄βββββ NATS JetStream ββββββ΄βββββ
β daemon ββββββββββββββββββββββββββΊβ daemon β
β encrypt β E2E encrypted msgs β decrypt β
βββββββββββ βββββββββββ
Quick Start
Connect two agents in 3 commands. No JSON editing.
Prerequisites
- Node.js 22+ (uses built-in
node:sqlite) - NATS server with JetStream:
docker run -d --name nats -p 4222:4222 nats:2.10-alpine -js --auth YOUR_SECRET
Step 1 β Host generates invite
git clone https://github.com/alexfrmn/mur-mur-v2.git && cd mur-mur-v2
npm install && npm run build
AGENT_ID=alice NATS_URL=nats://your-server:4222 NATS_TOKEN=YOUR_SECRET \
node scripts/agent-config-init.mjs
node scripts/murmur-invite.mjs
# β Prints MURMUR:eyJ... blob β send it to your peer via any channel
Step 2 β Peer joins with the blob
git clone https://github.com/alexfrmn/mur-mur-v2.git && cd mur-mur-v2
npm install && npm run build
AGENT_ID=bob NATS_URL=nats://your-server:4222 NATS_TOKEN=YOUR_SECRET \
node scripts/murmur-join.mjs 'MURMUR:eyJ...'
# β Prints MURMUR-REPLY:eyJ... blob β send it back to host
Step 3 β Host adds peer
node scripts/murmur-add-peer.mjs 'MURMUR-REPLY:eyJ...'
Start the daemons (both sides)
node scripts/murmur-daemon.mjs
Optional: expose Prometheus metrics
npm run build
METRICS_PORT=9464 node scripts/prometheus-exporter.mjs
# scrape http://localhost:9464/metrics
Exporter metrics include outbox depth by status, oldest pending age, inbound/outbound message totals, ack latency (avg/p95), retry rows, and dead-letter rows.
Send your first message
Add Murmur as an MCP server in your AI client (e.g., Claude Code):
claude mcp add murmur -- node /path/to/mur-mur-v2/packages/mcp-server/dist/src/index.js
Then from your AI agent:
# Fire-and-forget
murmur_send(to: "bob", text: "Hello from Alice!")
# Or send-and-wait (blocks until reply arrives)
murmur_request(to: "bob", text: "Review this code please", timeout_ms: 300000)
That's it. Alice and Bob can now exchange encrypted messages β no human relay needed.
How It Works
sequenceDiagram
participant A as Agent Alice (Claude)
participant MA as Alice's MCP Server
participant DA as Alice's Daemon
participant NATS as NATS JetStream
participant DB as Bob's Daemon
participant MB as Bob's MCP Server
participant B as Agent Bob (GPT)
A->>MA: murmur_request(to: "bob", text: "Review this code")
MA->>MA: Encrypt (X25519 + XChaCha20)
MA->>MA: Sign (Ed25519)
MA->>DA: Enqueue to SQLite outbox
DA->>NATS: Publish encrypted envelope
NATS->>DB: Deliver to Bob's subject
DB->>DB: Verify signature + decrypt
DB->>MB: Store in local_messages
Note over MA: Polling every 10s...
B->>MB: Process + generate response
MB->>DB: Enqueue reply to outbox
DB->>NATS: Publish encrypted reply
NATS->>DA: Deliver to Alice's subject
DA->>MA: Store inbound reply
MA->>A: Return reply (polling found it)
The Key Innovation: murmur_request
The biggest pain point with agent-to-agent messaging is the polling gap β after sending a message, agents forget to check for replies and ask the human to relay the response.
murmur_request solves this. It sends a message and automatically polls for the reply, blocking until a response arrives or timeout is reached:
Agent calls murmur_request("bob", "Review this PR")
β Message encrypted, signed, enqueued
β Polls inbox every 10s
β ... 45 seconds later ...
β Bob's reply arrives
β Returns the reply directly to the agent
This enables fully autonomous overnight work β launch 2-3 agents, they collaborate without any human relay.
Features
Core Messaging
- E2E Encryption β X25519 key agreement + XChaCha20-Poly1305 AEAD
- Digital Signatures β Ed25519 for message authentication
- At-Least-Once Delivery β persistent SQLite outbox with ACK correlation
- Dead-Letter Queue β poison messages quarantined after 3 failed attempts
- Exponential Backoff β with jitter on retry, configurable per broker
Agent Integration
- MCP Server β 7 tools for any MCP-compatible AI client
murmur_requestβ send-and-wait: no more manual polling- Invite Flow β 3 commands to connect two agents, zero JSON editing
- OpenClaw Bridge β route messages through LLM agents for autonomous processing
- Telegram Notifications β get notified when agents talk
Operations
- SQLite WAL β concurrent reads, write-ahead logging, optimistic locking
- NATS JetStream β sub-millisecond latency, 20MB RAM, durable streams
- Systemd Ready β production service file included
- Docker Compose β one-command NATS setup
- Observability Dashboard β real-time message flow visualization
Security
- Security Policies β senderβrecipient allow-lists, max payload size
- MLS Scaffold β group encryption interface ready (RFC 9420)
- No Plaintext β messages are always encrypted on the wire
MCP Tools
Murmur V2 exposes an MCP server (JSON-RPC over stdio) with 7 tools:
Agent-to-Agent (require peer config)
| Tool | Description |
|---|---|
murmur_request | Send message and wait for reply. Blocks until response or timeout. Best for autonomous workflows. |
murmur_send | Send encrypted message (fire-and-forget). Returns immediately after enqueue. |
murmur_inbox | Read inbound messages from peers. |
murmur_peers | List known peers and their key status. |
Local Storage
| Tool | Description |
|---|---|
send_message | Store a local message in the conversation store. |
list_conversations | List conversations by recency. |
search_messages | Full-text search across stored messages. |
Add to Claude Code
claude mcp add murmur -- node /path/to/mur-mur-v2/packages/mcp-server/dist/index.js
Add to any MCP client
{
"mcpServers": {
"murmur": {
"command": "node",
"args": ["/path/to/mur-mur-v2/packages/mcp-server/dist/index.js"],
"env": {
"DATA_DIR": "/path/to/mur-mur-v2/.data"
}
}
}
}
Architecture
mur-mur-v2/
βββ packages/
β βββ core/ # Envelope schema, SQLite stores, policy validation
β βββ broker-nats/ # NATS JetStream pub/sub, outbox flush, ACK correlation
β βββ security/ # NaCl crypto (X25519, XChaCha20, Ed25519), MLS scaffold
β βββ mcp-server/ # JSON-RPC MCP stdio server (7 tools)
β βββ bridge-telegram/ # Telegram bot adapter
β βββ bridge-openclaw/ # OpenClaw CLI dispatch bridge
β βββ bridge-murmur/ # Murmur-to-Murmur federation (stub)
β βββ observability/ # Metrics and tracing (scaffold)
βββ scripts/ # Daemon, invite flow, notification setup, demos
βββ tests/ # 22 unit + integration + smoke tests
βββ docs/ # ADRs, protocol spec, operations guide
βββ deploy/ # systemd unit, docker-compose
βββ dashboard/ # Real-time observability web UI + 3D visualization
βββ schema/ # JSON schemas for envelope and ACK frames
Design Decisions
| Decision | Choice | Why |
|---|---|---|
| Transport | NATS JetStream | Sub-ms latency, 20MB RAM, JetStream persistence, leaf nodes for federation |
| Encryption | X25519 + XChaCha20-Poly1305 | Modern AEAD, NaCl standard, ~30% faster than AES-GCM |
| Signatures | Ed25519 | Fast verification, small keys, deterministic |
| Storage | SQLite (node:sqlite) | Zero dependencies, WAL mode, built into Node 22+ |
| Group Crypto | MLS (scaffold) | RFC 9420, forward secrecy for groups β deferred to v1.0 |
See ADR-001 and ADR-002 for full rationale.
OpenClaw Integration
Murmur V2 can route messages through OpenClaw agents. When a message arrives, the daemon dispatches it to an OpenClaw agent (Claude, GPT, etc.) and sends the response back over Murmur.
Agent A β Murmur β NATS β Daemon B β OpenClaw CLI β GPT-5 β response β NATS β Agent A
This means you can see the full reasoning chain: what the model thought, what tools it used, and what it replied.
Setup
export MURMUR_OPENCLAW_SESSION_ID="your-session-id"
node scripts/murmur-openclaw-init.mjs
# Or use the preset:
node scripts/murmur-notify-init.mjs openclaw
Autonomous Agent Teams
With murmur_request + OpenClaw bridge, you can run autonomous agent teams overnight:
- Agent A (Claude) sends a code review request via
murmur_request - Murmur encrypts, signs, and delivers to Agent B's daemon
- Agent B's daemon dispatches to OpenClaw β GPT-5 processes the review
- Response flows back through Murmur, encrypted
- Agent A receives the reply automatically (no human relay)
All messages are E2E encrypted. All responses are logged in SQLite.
Deployment
Systemd (recommended)
sudo cp deploy/murmur-daemon.service /etc/systemd/system/
sudo systemctl enable --now murmur-daemon
Docker
# Start NATS
docker compose -f deploy/docker-compose.messaging.yml up -d
# Run daemon
node scripts/murmur-daemon.mjs
Notification Adapters
# Telegram
node scripts/murmur-notify-init.mjs telegram
# Discord
node scripts/murmur-notify-init.mjs discord
# OpenClaw auto-bridge
node scripts/murmur-notify-init.mjs openclaw
Testing
npm test # Build + all unit tests (22 tests)
npm run test:integration # ACK correlation integration
npm run test:notify-smoke # Notification adapter smoke
npm run test:openclaw-bridge-smoke # OpenClaw bridge smoke
# One-command secure E2E demo
npm run demo:secure
Envelope Format
Every message is an EnvelopeV1:
{
"schemaVersion": "1.0",
"msgId": "uuid",
"conversationId": "dm:alice:bob",
"senderAgentId": "alice",
"recipients": ["bob"],
"createdAt": "2026-04-12T12:00:00.000Z",
"payloadCiphertext": "base64...",
"payloadNonce": "base64...",
"signature": "base64..."
}
Optional fields: ttlSeconds, traceId, sequence, parentMsgId.
See protocol-v1.md for the full specification.
Roadmap
Delivered
- E2E encryption β X25519 + XChaCha20-Poly1305 + Ed25519 signatures
- Invite-based peer setup β 3 commands, zero JSON editing
- MCP server with 7 tools β full agent integration
-
murmur_requestβ send-and-wait for autonomous workflows - OpenClaw bridge β route messages through LLM agents
- Observability dashboard β real-time message flow + 3D visualization
- Telegram/Discord/WhatsApp notification adapters
- Dead-letter queue + poison message handling
- SQLite WAL with optimistic locking
- Systemd + Docker deployment
In Progress
- Prometheus metrics exporter β outbox depth, delivery latency, error rates
- npm package publishing β
@murmurv2/*on npm registry - NATS native request-reply β replace polling with ephemeral inbox subjects
Planned (next wave)
- WebSocket transport adapter β browser-based agents
- Message streaming β large payload chunking with backpressure
- Agent discovery protocol β find peers without manual invite exchange
- Reference deployment examples β docker-compose, Kubernetes manifests
- Auth/authz model β token-based peer authentication
- Conformance test suite β integration tests for third-party implementations
- Versioned protocol spec β machine-readable schema + compatibility matrix
Research
- MLS group encryption (RFC 9420) β forward secrecy for multi-agent groups via OpenMLS WASM
- Murmur-to-Murmur federation β cross-cluster agent communication via NATS leaf nodes
Acknowledgments
Murmur V2 is built upon the ideas and protocol design of the original Murmur by @slopus. The original Murmur established the core concept of encrypted agent-to-agent messaging with Double Ratchet cryptography. Murmur V2 extends this foundation with NATS JetStream transport, MCP integration, persistent outbox delivery, and production hardening for autonomous multi-agent workflows.
License
MIT β alexfrmn, 2026
