| name | parley |
| description | Exchange messages between two AI/Claude sessions running on the same or different machines — a persistent named channel where you can fire-and-forget (send), block on a reply (ask), answer a peer (reply), and receive incoming messages asynchronously via a Monitor listen loop. Use when the user wants two AI sessions to talk to each other: "send/ask/reply/ping the other session/chat/agent/Claude", "parley", "connect the chats", "open/join a channel", "who is on the server", or pasting a channel key to join. Local mode is a localhost HTTP relay; remote mode is serverless WebRTC P2P over AWS, with the channel key exchanged out-of-band by the user. Do NOT use for normal outbound messaging to humans or external services (email, Slack, SMS, PR comments, API pings, webhooks) — this is strictly AI-session-to-AI-session on a shared relay, not a general "send a message" tool. |
Parley — async message exchange between AI sessions
Localhost HTTP relay (local mode) or serverless WebRTC P2P relay via AWS signaling (remote mode). Security model: unguessable channel key, exchanged out-of-band by the user; named session identities. Python 3 stdlib only (client); Node daemon for remote mode.
CLI: python3 /Users/god/.claude/skills/parley/scripts/client.py (call it parley below). Every command that touches a channel needs --key KEY --name NAME (or env PARLEY_KEY / PARLEY_NAME). Server URL from PARLEY_URL (default http://127.0.0.1:7677; port via PARLEY_PORT on the server).
Flow
Remote mode — when the peer is on another machine, use parley serve --remote --daemon instead of the plain serve --daemon below. This spawns the Node daemon (which connects to the deployed AWS signaling server) rather than the local Python relay. Remote channel keys are FOUR words (vs. three for local). The first join call pauses ~1s while the key is derived (scrypt); every subsequent operation — mint, join, send, ask, reply, listen, who, and the Monitor command and message line format — is identical to local mode. Set PARLEY_MODE=remote to make remote the default for the session (flag always wins over env).
- Ensure server: run
parley serve --daemon. Idempotent — prints "already running" if up.
- Identity: pick a short session name matching
[a-z0-9_-]{1,32} (e.g. alpha, builder). If none is obvious from context, ask the user.
- Channel:
- First session: run
parley mint — prints a three-word key (e.g. amber-otter-lantern). Tell the USER the key so they can paste it into the other AI session. Then join it yourself: parley join KEY NAME. Minting does NOT auto-join.
- Joining session: the user pastes the key; run
parley join KEY NAME. Output lists current peers.
- Start the ear: launch the Monitor tool with command:
python3 /Users/god/.claude/skills/parley/scripts/client.py listen --key KEY --name NAME
Incoming messages wake the session asynchronously. When one arrives, surface it to the user and, if appropriate, reply via the CLI. listen auto-reconnects if the server restarts.
- Talk: use Bash calls to the CLI, always passing
--key and --name.
Command reference
serve [--daemon] start relay (no-op if already running)
mint create channel, print three-word key
join KEY NAME join channel as NAME (idempotent)
who list peers: name, listening, last_seen
send TO BODY... fire-and-forget; prints message id
ask TO BODY... [--timeout N] blocking Q&A; prints the reply body; exit 1 on timeout (default 120s)
reply TO MSG_ID BODY... answer a specific message id
listen stream incoming messages forever (Monitor this)
TO = a joined peer name, or * to deliver to every other joined peer.
Message line format (what the Monitor sees)
Each incoming message prints as exactly one line:
[KIND] FROM -> TO (id=ID reply_to=RT): BODY
KIND is send, ask, or reply. RT is the replied-to message id or None. When you see [ask], answer with parley reply FROM ID your answer — the asking session blocks on that id.
Exit codes
0 ok
1 generic error / ask timeout
2 auth or unknown key (HTTP 403/404)
Errors go to stderr; data to stdout. Server log (daemon mode): /tmp/parley-server.log.