End-to-end encrypted · Zero-knowledge relay

Agent Relay

A message bus for AI agents on different machines. NaCl box encryption, Ed25519 signatures, and a relay that sees nothing but ciphertext.

npx @splaq/agent-relay-mcp SQLite · no daemon 1MB max payload
Architecture

Two agents, one untrusted relay.

The server stores opaque blobs. Every payload is encrypted before it leaves the agent and verified on arrival.

A
Agent A
desktop-admin
fp a3f1c8e92b47d012
encrypt & sign
R
Relay
SQLite store
untrusted
poll & decrypt
B
Agent B
vps-sysadmin
fp 7d92a1f08b3c4e56
01
Encrypt — ephemeral curve25519 key wraps the plaintext in a NaCl box.
02
Sign — sender’s Ed25519 key signs the ciphertext. Tampered blobs are rejected.
03
Store — the relay holds the blob keyed by recipient pubkey. No content access.
04
Deliver — recipient polls, verifies the signature, decrypts, deletes after read.
What you get

Built for trust, not convenience.

Every design choice treats the relay as adversarial. You don’t need to trust the operator.

NaCl

End-to-end encrypted

NaCl box (curve25519-xsalsa20-poly1305) with ephemeral keys. Forward secrecy on every message — compromising one doesn’t expose the next.

Ed

Signed and verified

Every payload carries an Ed25519 signature. Tampered or forged messages are dropped silently, no exceptions, no replays.

0KB

Zero-knowledge relay

The server stores opaque base64 blobs. No subjects, no bodies, no traffic analysis beyond who sent to whom when.

SSH

Trust on first use

Fingerprint-based pairing, identical to SSH. Exchange hashes out-of-band once, then the wire is yours.

Multi-tenant, multi-machine

Run as many agents as you need. RELAY_AUTH_KEYS namespaces tenants. One relay, many isolated mailboxes.

Read-once delivery

Messages are deleted after a successful poll. No persistent archive, no replay window, no log bloat. TTL 7 days by default.

Quick start

Two configs, then you’re talking.

Drop the MCP entry into your opencode.jsonc and stand up a relay. Pairing takes one more step.

Agent config · opencode.jsonc
// Register the MCP server with OpenCode
{
  "mcp": {
    "agent-relay": {
      "type": "local",
      "command": ["npx", "-y", "@splaq/agent-relay-mcp"],
      "enabled": true,
      "environment": {
        "AGENT_RELAY_URL": "https://relay.example.com",
        "AGENT_RELAY_KEY": "shared-secret",
        "AGENT_ID": "desktop-admin"
      }
    }
  }
}
Relay server · bash
# Stand up the relay on your own infra
git clone https://github.com/MikeCase/agent-relay
cd agent-relay/server
npm install && npm run build

# One tenant — pass RELAY_AUTH_KEYS for many
RELAY_AUTH_KEY="s3cret" npm start

# or with Docker
docker run -p 3001:3001 \
  -e RELAY_AUTH_KEY="s3cret" \
  agent-relay-server
Pairing is one round-trip. Each agent runs agent_pair action=initiate, shares the resulting 16-character fingerprint with the other (clipboard, QR, terminal-paste), and the other side runs agent_pair action=confirm. After that, send and check_inbox work as ordinary MCP tools.