# Report from several agents

> Bind several agents to one resident so their progress collects in one window, told apart by author.

Several agents can share one resident so their updates collect in a single timeline. Every agent binds the same `namespace` and `key`, then writes with its own `author`.

```json title="1. First agent binds the shared pair — pixling_resident_ensure"
{"namespace": "my-team", "key": "release-1", "assetID": "No.7"}
```

```json title="2. Other agents join the same pair — pixling_resident_ensure"
{"namespace": "my-team", "key": "release-1"}
```

| Setup | Best for | Reply routing |
| --- | --- | --- |
| **One shared resident** | Agents on one job where you want a single chronological feed | Every user reply goes to **one shared inbox** |
| **One resident per agent** (as plugins do per session) | Seeing which agent is waiting and replying to it directly | Each agent has its **own inbox** |

```text title="Shared resident topology"
  Builder  ──(author: "Builder")──┐
  Tester   ──(author: "Tester")───┼──▶  client:my-team/release-1 (one window, one status)
  Deployer ──(author: "Deployer")─┘                 │
                                                    ▼
                                          one shared inbox ──▶ Coordinator reads & routes
```

> [!CAUTION]
> **Avoid key conflicts and accidental stow**
> - Passing a different `assetID` or `name` for an existing pair fails with `clientKeyConflict`.
> - Keep the shared pair separate from any agent's private pair so stowing one agent's resident does not stow the team's resident.

## Name every sender

Set a distinct `author` on every call so Pixling labels who wrote each card:

```json title="pixling_message_send"
{
  "to": "client:my-team/release-1",
  "text": "Build passed, 312 tests",
  "author": "Builder"
}
```

Pixling distinguishes senders by connection (MCP or CLI), `author`, and route. Because all MCP callers share one connection, `author` is what tells them apart: agents that reuse the same `author`, or omit it, count as one sender.

- **Labels and order**: Cards stay oldest at the top, print `author` whenever the sender changes, and name the newest sender along the top edge.
- **Shared 200-card cap**: The 200-card history limit ([Build expression](/docs/connect/expression/)) applies across all senders combined, including letters (`keep: true`). Past 200, the oldest card drops first regardless of sender.

Full sender and dropping rules: [Messages and questions](/docs/reference/messages-and-questions/).

## Ask from any agent

Any agent can call `pixling_question_ask` on the shared pair with its own `author`:

- **Waiting call**: The answer returns directly to the waiting call.
- **No waiting call**: The answer lands in the shared inbox as `kind: answer`, where `answer.promptID` identifies whose question it was ([Read what comes back](/docs/connect/own-a-resident/#read-what-comes-back)).
- **Queue limit**: One resident accepts up to **4 waiting questions** at once; a fifth fails with `residentBusy`.

## Choose one agent to read

A shared pair has a single [inbox](/docs/reference/inbox/). Because `pixling_inbox_read` marks an entry read for every agent and `pixling_inbox_watch` allows only **one waiting call per key**, designate one coordinator to watch, read, and route replies.

- Hold the CLI receiver (`pixling inbox receive`) from that coordinator ([Read what comes back](/docs/connect/own-a-resident/#read-what-comes-back)).
- Inbox entries do not record which message card the user was looking at when they typed.

## Set the state from one agent

- **One active state**: `pixling_resident_status` shows one state per resident, and every call replaces the previous one. Assign one agent to update status so agents do not overwrite each other.
- **Shared status looks**: Looks created with `pixling_status_define` belong to the asset, so any agents sharing the same asset and status name share that look.

> [!NOTE]
> **Who can move, edit, or stow the resident**
> - Any agent holding the pair can edit or stow the resident, and moving it requires no pair at all.
> - Once stowed, the resident stays put away: `resident.ensure` returns `stowed` instead of placing it again.
> - The only exception is a very old key evicted at the [lifetime limit](/docs/reference/resident-binding/#lifetime).

## Put away residents left behind

A session that ends cleanly can stow its resident from a hook, while one that crashes or is killed leaves the resident on the desk.

`pixling_residents_list` includes `clientBinding.lastSpokeAt` on each bound resident, recording the last message, letter, or question sent through it. Pixling does not judge staleness on its own:

1. Pick a cleanup rule in your harness (for example, stow bindings in your namespace that have been silent for a day).
2. Stow matching residents with `pixling_resident_stow`.
3. Handle silent residents explicitly: a resident that never spoke has no `lastSpokeAt`, so track its creation time in your harness if your rule needs it.

## Next steps

- [Give your agent a resident](/docs/connect/own-a-resident/): Bind a namespace/key pair, send messages, read the inbox, and request close.
- [Effects and retries](/docs/connect/effects/): Check which calls persist, which discard state, and what is safe to resend.
- [Messages and questions](/docs/reference/messages-and-questions/): Full rules for sender identity, 200-card history limits, and queued questions.
- [Inbox reference](/docs/reference/inbox/): Watching, reading, and receiving replies sent by the user.
