You talk to one agent
- You open your coding agent in your repo and say what to improve. You answer a short interview. After that, you only answer what needs you.
- Your agent is Claude Code, Codex, pi, Gemini CLI or Cursor, with the piloop skills. It sets up the campaign, starts the daemon and then orchestrates: it watches the inbox, decides escalations and records each decision in your inbox. It can run one campaign or several.
- The piloop daemon starts worker, research and watchdog agents. It scores every commit and gives it a verdict.
- The inbox holds the escalations and every decision that your agent took for you. You review it when you want,
in
piloop watchor through your agent.
piloop CLI, piloop.toml and piloop watch are the tools that your agent uses. You can use them too, but you
do not have to.
Why piloop
A coding agent can try an idea in minutes. A hundred ideas need bookkeeping: which idea ran on which code, what it scored, and whether the gain is real or noise. piloop does this bookkeeping for you.- Every commit is scored. piloop runs your evaluate command in a clean checkout of each commit, so an agent does not report its own score. Keep the evaluate command out of the files that the agents may change (see the evaluate command).
- A gain must be real. piloop compares each result with the best one so far. When your evaluate command reports results per example, piloop uses a paired bootstrap, so a gain that comes from a few lucky examples is not kept.
- Guardrails are enforced. A second metric, such as latency or size, can get worse only by a margin that you set, and never past a floor.
- Agents work in parallel. Each worker has its own worktree. A research agent keeps the backlog full. A watchdog agent looks for problems.
- You do not have to wait at the screen. Your agent answers what the other agents escalate. It records each decision in your inbox, so you can review and revert it later.
- Your state stays local. The state is a SQLite database and the run directories in
PILOOP_HOME(~/.piloopby default), and the git refs in your repo. piloop has no hosted service and no account. The coding agents send your code and their prompts to their model providers, as they do when you use them yourself.
How a campaign works
- You, the orchestrator or the research agent add ideas to the backlog of the project.
- The daemon,
piloop serve, starts a worker for each ready idea, up to a limit that you set. Each worker is a coding agent in a git worktree of the head, the best result so far. - The worker implements the idea and commits.
- The daemon runs the evaluate command in a clean worktree of each commit. The command prints one
METRIC <name>=<value>line for each metric. - The daemon gives the commit a verdict:
keep,interesting,discardorcrash. Akeepbecomes the new head, and the next runs start from it. - The watchdog looks for problems. The research agent adds ideas when the backlog is short. The orchestrator answers escalations and records each decision in your inbox.
Requirements
- Linux or macOS.
- git, with a commit identity (
git config user.email). - uv. The installer installs it.
- At least one worker agent CLI, logged in: Claude Code, Codex or pi. The agent that you talk to can also be Gemini CLI or Cursor.
- Optional: Herdr, to see and steer every agent in a terminal pane. By default, the agents run
in the background. To use Herdr, set
runtime = "herdr". - Optional: Entire, to keep the session of every agent in your repo.
Next steps
Quickstart
Install piloop, open your agent and describe the problem.
Several campaigns
One agent runs a campaign in each of your repos.
Run a campaign by hand
The same steps without an agent, on the enwik8 example or your own repo.
Concepts
Projects, ideas, runs, candidates and the verdict.