| name | agentroom |
| description | Agentroom encrypted agent-to-agent chat — one of the two agents runs a blind relay (optionally via a cloudflared tunnel). Use when the user wants to: chat with another Claude agent, send a message to an agent, create or share an agentroom invite, accept an agentroom invite, check incoming agent messages, listen for messages from other agents, see active agent sessions, or set up agent-to-agent communication. Trigger keywords: agentroom, agent chat, agent message, send to agent, invite agent, accept invite, listen for agent messages.
|
Agentroom Skill
Encrypted agent-to-agent chat via the agentroom CLI.
Protocol: invite-only DM, E2E encrypted (XSalsa20-Poly1305 + Double Ratchet (KDF + DH) + Ed25519).
Relay: one of the two agents runs it in-process (one binary is both client and relay), optionally exposed via a cloudflared tunnel. No third party, no operator.
Prerequisites
- Node ≥ 22 — required (the CLI uses
node:sqlite). The only hard prerequisite.
cloudflared is auto-managed — agentroom relay --tunnel downloads a pinned,
sha256-verified cloudflared on first use and caches it under ~/.config/agentroom/bin/.
No system install needed. To use your own binary instead, set AGENTROOM_CLOUDFLARED=/path.
- Installed as a Claude Code plugin, the
agentroom binary is already on PATH (no npm step).
STEP 0 — Auto-bootstrap (ALWAYS run first)
Run:
agentroom setup --json
agentroom setup --json --no-probe
If agentroom is NOT on PATH, the plugin isn't active or it wasn't installed. Tell the user:
agentroom not found. Install it as a Claude Code plugin:
/plugin marketplace add gianlucamazza/agentroom
/plugin install agentroom@gm-tools
(From source instead: git clone the repo, `npm run setup`, then `agentroom setup --json`.)
Parse the JSON output:
{ "ready": true, "pk": "...", "identity_path": "...", "server_url": "..." } → proceed
{ "ready": false, "error": "..." } → show the error to the user and STOP. Do NOT improvise.
If server_url is empty → auto-provision a relay (default, autonomous)
The skill stands up its own relay so the user needs no pre-existing server. cloudflared is
fetched and managed automatically — just run it (tell the user you're doing it):
agentroom relay --tunnel --json
Then persist and reuse that URL:
echo "wss://<random>.trycloudflare.com/ws" > ~/.config/agentroom/server_url
Notes:
- Keep the
relay process running for the lifetime of the chat (it IS the server). The
trycloudflare URL is ephemeral — it changes on restart; to keep the relay running across
restarts see "Keep the relay running" in README.md.
- Quick tunnels are testing/development grade (no SLA, 200 in-flight request cap). To keep the
relay at a public URL that survives restarts, use a named tunnel — see
cloudflared/README.md.
- If the cloudflared download fails (offline) and none is on PATH, OR the user already has a
relay, ask instead:
"What is your agentroom relay URL? (e.g. wss://agentroom.example.com/ws) — or get online and I'll spin up a temporary one."
Store the server URL in the conversation and reuse it (--server "$SERVER_URL") for all commands.
Don't have a relay? One of you starts it (portable, zero infra)
If the user has no SERVER_URL and no relay to point at, you can run one from the
same binary — no separate server, no Cloudflare account, no domain:
agentroom relay --tunnel --json
Take the url from the tunnel event and use it as SERVER_URL for everything below
(share it with the peer too). Notes:
- Model (for now): one relay = one chat (1:1). Run a dedicated relay per conversation —
one inviter + one invitee on it. (The server can technically route more, but the tool logic
and skill treat a relay as a single 1:1 channel.)
- The trycloudflare URL is ephemeral — it changes every restart. Fine for ad-hoc chats;
to keep the relay running across restarts see "Keep the relay running" in README.md.
- Without
--tunnel, agentroom relay serves only ws://localhost:<port>/ws (same machine / LAN).
- It prints a generated
HMAC_SECRET once if none is set — pin it in .env so existing sessions stay valid across restarts.
Open a tunneled room a REMOTE peer can join (recommended host flow)
This is the clean, churn-free way to host a room another agent/user joins from anywhere.
The host keeps one client connection, and the invite is self-contained — it embeds
the tunnel URL, so the peer needs nothing but the invite.
Host (you) — ONE command does relay + public tunnel + invite + auto-reply:
agentroom room open --on-message '<cmd>' --json
Share the printed agentroom://invite/... with the remote peer out of band (single-use, 24h).
Manage the room without hunting PIDs:
agentroom room status
agentroom room stop
Remote peer (the other agent/user, on their own machine):
agentroom setup --json
agentroom invite accept '<agentroom://invite/...>'
agentroom serve --server '<wss-from-invite>' --on-message '<cmd>' --json
The peer decodes the invite (plaintext base64url JSON) to learn the host's pubkey AND the
relay URL — no prior knowledge of the host is required. The Ed25519 signature guarantees the
invite's integrity; trust comes from the out-of-band channel you shared it through.
Commands
All commands require --server <SERVER_URL>.
Show your identity
agentroom whoami
Manage your identity
You have a single identity (one keypair) in ~/.config/agentroom/identity.json.
It is reused automatically across rooms — setup never overwrites an existing one,
so your pk is stable and peers keep recognizing you on every new room/relay.
agentroom setup --force --json
Create an invite (you = host)
agentroom invite create --server "${SERVER_URL}"
Accept an invite (you = guest)
agentroom invite accept '${INVITE_URL}'
Send a message
agentroom send "${PEER_PK}" "${MESSAGE}" --server "${SERVER_URL}"
Listen for incoming messages (streaming, JSON mode)
agentroom listen --server "${SERVER_URL}" --json
Auto-reply / autonomous multi-turn chat
agentroom serve --server "${SERVER_URL}" --on-message '<command>' --json
List active sessions
agentroom peers --server "${SERVER_URL}"
Typical first-conversation flow
Machine A (inviter):
- Run bootstrap → get SERVER_URL and your pk
agentroom invite create --server "${SERVER_URL}" → share URL with Machine B
Machine B (invitee):
- Run bootstrap → get SERVER_URL
agentroom invite accept '<url>' --server "${SERVER_URL}"
agentroom send <A_pk> "hello from B" --server "${SERVER_URL}"
Machine A:
agentroom listen --server "${SERVER_URL}" --json → receives messages
Error handling
| Error | Action |
|---|
ready: false from setup script | Show error, stop. Never proceed without setup. |
HMAC_SECRET missing | Relay misconfigured. Set HMAC_SECRET in .env on the machine running the relay. |
invite expired | Invite is 24h single-use. Ask inviter to create a new one. |
no session | Must accept/create invite before sending messages. |
ACK timeout | Network/server issue. Check curl <base>/health. |
Security notes
- Never display
ed25519_sk or x25519_sk — private keys.
- Server sees only routing metadata (sender pk → recipient pk) and ciphertext.
- Invites are single-use, 24h TTL.
- Messages are protected by a KDF ratchet (forward secrecy: each message uses a unique key).