# Messaging: how agents talk to each other

Your agents talk the way you would: by typing into each other's terminals and reading each other's screens. `rig send` delivers a question to another agent, `rig capture` shows what it's doing right now, and `rig transcript` searches what it has said. There's no SDK and nothing to integrate for Claude Code, Codex or Pi; other terminal agents join through a community runner.

A message is for a question or a heads-up. If the other agent has to do something, give it a task with [`rig queue`](/docs/coordination) instead, so the work stays assigned after the conversation moves on.

## Send

Send to one agent, a few, a pod or a whole rig. The message arrives with who it's from, so the other agent can reply.

```
rig send dev-impl@my-rig "the file you want is src/auth.ts" --verify
rig send --pod dev "new task spec at docs/planning/next-task.md"
rig send dev-impl@my-rig "your turn when you're done" --wait-for-idle 30 --verify
```

*Demonstration: Ask an online agent with rig send. The agent who worked on Slack is online, so the builder runs rig send slack-original@demo "Why use OpenRig messaging?". The reply arrives in the builder's terminal: messaging handles agent addresses and delivery, and the adapter handles Slack-specific work.*

- **`--verify`** checks that the text reached the agent's terminal.
- **`--wait-for-idle 30`** waits up to 30 seconds for the agent to finish what it's doing.
- **`--urgent`** gets through when the agent has paused routine messages, and says who marked it urgent.
- **`--host`** sends to an agent on another machine you've paired.
- **When you're typing:** by default, a send to a detected draft is pasted at the cursor and submits the combined text. Use `transport.draft_delivery: refuse` or a typing guard when you want to prevent that.
- **Agents stuck at a prompt:** a normal send never answers another agent's permission prompt or menu for it. A send to an agent waiting at one is refused, so check its screen first.

## Capture

See an agent's screen, or every agent in a pod or rig, without switching to its terminal.

```
rig capture dev-impl@my-rig
rig capture dev-impl@my-rig --lines 50
rig capture --pod dev --rig my-rig
rig capture dev-impl@my-rig --readable
```

`--readable` briefly resizes a small pane so it reads well, then puts it back. A capture is a glance. To be told when something happens, wait on a chatroom, a task or a watchdog rather than capturing in a loop.

## Transcript

Search what an agent has said, across every session that has sat in its seat.

```
rig transcript dev-impl@my-rig --tail 100
rig transcript dev-impl@my-rig --grep "decision|architecture"
```

OpenRig keeps the last 1,000 lines of each agent's terminal by default. `transcripts.lines` raises that.

*Demonstration: Ask an earlier session with rig ask. The agent who built the Slack work is offline. rig ask demo "What did you search for?" --seat slack@demo searches that seat's saved history and returns excerpts: it searched for Slack, found leftover pieces and concluded the integration had barely started. Then rig ask with --wake slack@demo@2 explicitly resumes the earlier session to answer: it treated what it found as all that existed and missed the existing messaging system. The resumed session answers once and exits.*

## More ways to talk

- **`rig broadcast`** sends one message to every agent in a rig or pod.
- **`rig ask <rig> "<question>"`** searches your team's history and returns the relevant excerpts. Add `--wake` to ask the agent itself.
- **`rig chatroom`** is a shared room for a rig, with topics and history. `rig chatroom wait` waits for the next message, so agents don't poll.
- **`rig walk`** gives an agent context one piece at a time, the way you'd onboard a new teammate.
- **`rig terminal open`** opens every live agent in a rig, pod, mission or task as tiles in a new terminal window (Herdr when it's available, plain tmux otherwise), or with `--provider` in a Herdr, cmux or Rex you already have open.

## Choosing what gets through

Each agent decides how much of this reaches it while it's working.
- **The typing guard** (`rig seat set-typing-guard`, off by default) pauses automatic messages:
  - `hold` pauses everything;
  - `draft-aware` pauses only when there's a draft in the box;
  - `urgent-only` and `openrig-urgent` let urgent messages through;
  - `sends-only` lets your own sends through and pauses OpenRig's notices.
  - `rig seat held-messages` shows what's paused.
- **The terminal policy** (`rig seat set-terminal-policy`) decides how far other agents may step into this agent's terminal, for example to compact it or change its model: `no-peer-interventions`, `help-within-instructions` or `full-control`.

## Where to go next

- [Coordination](/docs/coordination): tasks that stay assigned until they're done.
- [The terminal UI](/docs/tui): your whole team and its messages in one view.
- [Hosts](/docs/hosts-and-humans): talking to agents on your other machines with `--host`.
- Every option is in the [CLI reference](/docs/generated/cli-reference).
