> ## Documentation Index
> Fetch the complete documentation index at: https://piloop.autoresearch.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Watching a campaign

> piloop watch shows the campaign on one screen, with keys to act on it.

`piloop watch` is a terminal app over the database. It shows every project, or one project with
`piloop watch <project>`. It reads the database again whenever the daemon or an agent writes to it.

## The screens

The first screen lists every project, the active ones first. Press `enter` to open one, and `esc` to come back.

It shows one row per project: its status, the head and its gain over the baseline, the live agents, the ready ideas, the
inbox, the tokens and the last event.

A project has a header, four panels on the left, and the main pane on the right, which shows the selected row in
full:

<img src="https://mintcdn.com/piloop/PWcpOFg0ujCigeSw/images/watch-campaign.svg?fit=max&auto=format&n=PWcpOFg0ujCigeSw&q=85&s=74507a49cc0046eab61a7585e7dd343f" alt="A campaign in piloop watch: the inbox, agents, ideas and candidates on the left, the selected row on the right" width="1970" height="1172" data-path="images/watch-campaign.svg" />

These screens are from the enwik8 example campaign after its 10 runs. The Candidates panel, with the head selected:

<img src="https://mintcdn.com/piloop/PWcpOFg0ujCigeSw/images/watch-candidates.svg?fit=max&auto=format&n=PWcpOFg0ujCigeSw&q=85&s=e3ca16d2cb08011cec3f6a0f7bd28589" alt="The candidates panel and a kept candidate's verdict" width="1970" height="1172" data-path="images/watch-candidates.svg" />

The Ideas panel, with an idea that research wrote from the losses it measured:

<img src="https://mintcdn.com/piloop/PWcpOFg0ujCigeSw/images/watch-ideas.svg?fit=max&auto=format&n=PWcpOFg0ujCigeSw&q=85&s=df7511642ae5e5b87d27e117aaa578cf" alt="The ideas panel and research's hypothesis and plan for an idea" width="1970" height="1172" data-path="images/watch-ideas.svg" />

The header shows the head, the number of keeps and the tokens. The second line shows the progress against `[stop]`,
and the spend against `[spend]` when the project has a budget. With several [tracks](/concepts/tracks), one more line
shows each track.

## Panels and keys

These keys work on the screen of a project. `?` and `q` also work on the list of projects.

| Key | Action |
| - | - |
| `1` to `4`, `tab` | Move between the panels. |
| `0` | Move into the main pane, to scroll it. |
| `↑` `↓`, `j` `k` | Select a row. |
| `/` | Filter the panel. `enter` applies the filter, `esc` clears it. |
| `?` | List the keys of the panel. |
| `esc` | Go back to the list of projects. |
| `q` | Quit. |

| Panel | Rows | Main pane | Keys |
| - | - | - | - |
| \[1] Inbox | The unacknowledged items, most urgent first, without the items that you wrote. | The item and its thread. | `a` acknowledge, `A` acknowledge every item shown, `r` reply |
| \[2] Agents | The running agents: `●` working, `○` idle, `◐` waiting on a dialog. | The agent, its task, and its last 60 lines of output. | `enter` open its Herdr tab, `s` steer (both with the Herdr runtime) |
| \[3] Ideas | Seeds, then proposed, ready, scheduled and parked ideas, and by priority within each status. | Hypothesis, plan, links, runs and comments. | `y` approve, `p` park, `x` reject, `+` `-` priority |
| \[4] Candidates | The candidates, newest first, then the imported references. The title shows the head after each keep as a sparkline. | Verdict and reason, metrics against the parent, summary. | none |

## What the keys write

Each key writes as `PILOOP_ACTOR`, which is `human` unless you set it. The `events` table records the write like any
other.

* **Acknowledge** does what `piloop inbox ack` does.
* **Reply** asks for the text and a priority (default 2). It writes a `decision` comment that replies to the first
  item of the thread. The orchestrator's next wait returns with it, and the orchestrator acknowledges it after it
  applies it.
* **Steer** queues text for the agent's next turn, as `piloop prompt` does. Herdr refuses while the agent waits on a
  dialog. Press `enter` to go to the agent's tab and answer the dialog.
* **Approve, park and reject** ask why. Each one writes the status change and a `note` on the idea with the reason.
  A seed cannot be approved: research develops it into an idea first (`piloop idea develop`).

## In Herdr

By default, the agents run as background processes. To see every agent in a terminal pane, install
[Herdr](https://herdr.dev) and set `runtime = "herdr"` in `piloop.toml`. Then piloop has its own Herdr session,
`piloop`, with one workspace for each project. The first tab of a workspace is `home`: a shell on the left and
`piloop watch <project>` on the right. Each agent gets its own tab, named after its role, its id and its idea:

```text theme={null}
my-project
  home                                shell │ piloop watch
  worker-12 idea#5 Stacking with a meta-learner…
  research-7
  watchdog-13
```

`piloop attach <worker-id>` opens an agent's tab from any terminal.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.