Every role has the same lifecycle. The daemon writes a
workers row, starts the agent, waits until the agent ends or
times out, saves the screen transcript, reads the tokens that the agent used, attaches the session to
Entire, and closes the row. piloop status lists the running agents with their ids.
The orchestrator is not a role. The daemon never starts it.
Configure a role
Each role has a table inpiloop.toml. These keys are common to every role:
The defaults:
[max_concurrent] table limits one harness across every role, for example claude = 2 when your
account limits the request rate. When it is the turn of a harness at its limit, the slot goes to the next harness of
the rotation.
Worker
A worker gets one idea. Its brief has the worker instructions, yourbrief.md, the idea, the starting point and the
recent results. It may edit the code in its worktree and commit. It writes a finding comment on its idea at the end.
It must not change the rows of runs, candidates or measurements, and it files no ideas or seeds.
Watchdog
The watchdog informs. It never edits code or changes a row. It writes comments: findings, notes and escalations for the orchestrator, and seeds for research. It runs in one of two modes:- An incident sweep, when the daemon detects an anomaly. Anomalies are a failed or timed-out run, an agent that died at startup, a run on the wrong base, and a worker with no comment or commit for an hour while its jobs run.
- A progress review, every
[roles.watchdog] intervalseconds. It asks whether the campaign is getting closer to its goal. When the campaign stops, one last progress review writes the closing report.
Research
The research agent keeps the workers supplied with ideas. A sweep:- Reads the research pack that the daemon builds: the metrics, what each source of ideas produced, the analysis
files listed in
[roles.research] context, what was tried for each mechanism, every idea with its outcome, the kept lineage, and the findings.piloop historyprints the same pack. - Develops each waiting seed into an idea, or rejects it with the reason.
- Adds ideas of its own, up to
max_ideas, where the head loses the most. - Writes one
findingon the project.
- A seed is filed.
- The backlog is short: fewer ready ideas than one per worker slot plus
buffer. When a sweep defines no idea, research waits longer before the next one.
piloop launch <project> research.
Scout mode
Experimental: scout mode.
- It writes a problem statement first: the open problems as measured losses, what was tried, and the constraints.
- It searches X, GitHub and arXiv by problem, never by person.
- It ranks the results by substance: a number against a baseline, code, a method, an ablation.
- It files at most
seedsof them as seeds. The others go to the technique library, thetechniquestable. - It writes one
findingon the project, at priority 3, so that it reaches your inbox.
interval has no default:
piloop launch <project> research --scout. A search tool for X needs an MCP server; see
MCP servers.
Ask for one more agent
piloop launch <project> research (or watchdog) asks the daemon for one more agent of that role. The daemon starts
it on its next tick, within max_concurrent. Use --harness and --model to pin them, and --reason to add a line
to the brief.
An agent can do the same with SQL. The workers table is the launch queue:
Look at an agent
piloop attach <worker-id>focuses the agent’s tab in the piloop Herdr session and attaches your terminal.piloop prompt <worker-id> "<text>"types text into the agent’s pane.piloop watchshows the agents with their last output.
~/.piloop/runs/<run>/ for a worker, and in
~/.piloop/workers/<worker-id>/ for the other roles.