rz
Agent-to-agent messaging over Zellij panes.
Spawn LLM agents (or any process) in Zellij panes and let them communicate directly — no files, no sockets, just pane IDs.
Install
Requires Zellij 0.44.0+.
Usage
# Spawn an agent with bootstrap instructions + task prompt
# Send a message to an agent
# Send raw text (no protocol envelope)
# List all running panes
# Read an agent's full scrollback
# Stream an agent's output in real-time
# Broadcast to all agents
# Visual identification
# Close an agent
How it works
rz wraps Zellij's CLI:
| rz command | Zellij action |
|---|---|
rz send |
paste --pane-id + write --pane-id 13 |
rz spawn |
run -- <cmd> (returns pane ID) |
rz list |
list-panes --json |
rz dump |
dump-screen --pane-id --full |
rz watch |
subscribe --pane-id |
rz close |
close-pane --pane-id |
Protocol
Messages can be sent as plain text (--raw) or wrapped in an @@RZ: envelope:
@@RZ:{"id":"a1b20000","from":"terminal_0","kind":{"kind":"chat","body":{"text":"hello"}},"ts":1774298000000}
The @@RZ: prefix lets agents distinguish protocol messages from human input. The JSON is not base64-encoded — it's human-readable on the wire.
Bootstrap
When you rz spawn an agent, it automatically receives:
- Its identity (pane ID and name)
- How to use
rz(full command reference with the binary path) - A list of all other active agents
This means spawned agents can immediately communicate without any manual setup.
License
MIT OR Apache-2.0