--help. With PILOOP_SERVER set, a command that calls the API asks that server
(On a server).
piloop agent
Act on one agent.piloop agent messages
HARNESS, --harness: The harness whose hook reads them: one message a line without it.
piloop agent cancel
--wrap-up, after it was told to save its work and stop. For an implementer, this cancels its run (piloop run cancel).
Arguments:
AGENT_SESSION_ID: The id of the agent. [required]
--wrap-up: Tell the agent to save its work and stop first, and end it 10 minutes later.
piloop attach
[agents] attach_lines of them.
An agent is a background process, with no terminal to type into: piloop prompt sends it a message.
A running agent’s lines come from the latest snapshot of its session, on any machine: a few seconds old, 30 at most.
Arguments:
AGENT_SESSION_ID: The id of the agent. [required]
piloop campaign
Act on a campaign as a whole.piloop campaign parent
piloop campaign tree shows the tree.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]PARENT_REF: The campaign to put it under.
--clear: Make the campaign a root.
piloop campaign tree
piloop campaign stop
[stop] condition holds.
This works also while the campaign is paused or held by its stop rule. It drops the queued runs and the requested
agents. Each running implementer is told to save its work and stop, and is ended 10 minutes later. What the
implementers saved is scored.
With --kill, the implementers are ended at once, and what they committed is still scored. On a stopped campaign,
--kill ends the implementers that are still winding down. The campaign’s piloop.toml is not changed.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]
--kill: End the running implementers at once, without the wrap-up prompt.--reason STR: Why, forstopped_reason. [default: ""]
piloop campaign fork
REF: The campaign name, its id, or a path inside its repo. [required]
--at STR: The version to start from, as the source’s vcs names one. Default: its best.--name STR: The new campaign’s name. Default: <source>-<n>.
piloop campaign sync
piloop candidate import, or a fork with piloop campaign fork --at. A local checkout is read where it is:
piloop init <path> does the same. For a private repository: --secret, or a token piped in with
--token-stdin.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]
--secret STR: The name of the server’s secret that the host of the campaign’s repository asks for.--token-stdin: Read a token that the repository’s host accepts from stdin, for this sync alone: nothing keeps it.
piloop campaign reopen
piloop init instead. A retired campaign does not reopen: fork it.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]
--reason STR: Why, with ids. [required]
piloop campaign retire
piloop status leaves it out unless --status retired asks for it, and a new campaign may
take its name. Its rows, events and archived files stay, and its id still names it. The reason goes into a note on
the campaign.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]
--reason STR: Why, with ids. [required]
piloop candidate
Show a candidate, import a starting point, measure a candidate again, note one, or exclude one from the best.piloop candidate show
CANDIDATE_ID: The candidate. [required]
piloop candidate import
revision into this campaign’s repo first.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]VERSION: A version in the campaign’s repo, as its vcs names one: a revision, a branch, a tag. [required]
--summary STR: A summary of the candidate. Default: the version’s own summary.
piloop candidate remeasure
--repeats more times, with the current evaluator.
Use it when a fault of the host spoiled a measurement (a full disk, a lost GPU), or when load made it noisy. The
candidate’s mean includes the new evaluations, so the pool and its best follow. It measures soon, after the
baseline, also when the campaign is stopped: not while it is paused with --evals, or held by its stop rule. A
commit that the daemon never measured, skipped or recovered, gets its first evaluations. If infrastructure
failures paused this candidate’s task, the request also resumes evaluations of that task.
Arguments:
CANDIDATE_ID: The candidate to measure again. [required]
--repeats INT: How many more evaluations. [default: 3]
piloop candidate note
--follow-up is an open idea about the
candidate, whose run can start from it (piloop idea claim <id> --base <candidate>). An implementer files no
follow-ups.
Arguments:
CANDIDATE_ID: The candidate. [required]REASON: Why the tree is worth starting from. [required]
--follow-up STR..., --empty-follow-up: An open idea about the candidate. Repeatable. [default: ()]--track STR: The track of the follow-ups. Default: the track of the candidate’s run, else the first track.
piloop candidate exclude
candidate.excluded_reason event records the
reason, signed as PILOOP_ACTOR. To take it back, set excluded_reason and excluded_by to NULL with piloop sql.
Arguments:
CANDIDATE_ID: The candidate. [required]
--reason STR: Why it may not be best, with ids: what the number does not say. [required]
piloop cas
This home’s CAS: print a blob, or serve the CAS to workers on other machines.piloop cas get
[plugins.cas] to stdout: a blob as stored, or a chunked file whole.
An agent’s session file (agent_sessions.session_file) is a chunked file.
Arguments:
CID: The address of the file. [required]
piloop cas serve
[plugins.cas] until Ctrl-C or SIGTERM. Each caller sends a worker’s token.
Where the home’s daemon does not hold its term (a standby under [plugins.leader] provider = "bucket"), it forwards
each request to the CAS server of the daemon that does, at the same port, and answers 503 while none does.
Parameters:
--listen STR: Serve on HOST:PORT. An address that is not loopback needs TLS ([plugins.network]). [required]
piloop doctor
piloop escalate
[plugins.escalation] provider checks the form and says what to fix. --guide prints its fields,
limits and an example.
Arguments:
TARGET: What it is about, such as idea#12. [required]
--priority INT: From 0 (urgent) to 4 (someday). [default: 2]--guide, --no-guide: Print how to fill the form of the target’s campaign.
piloop eval
List or cancel the evaluations that the daemon runs or that wait for a slot.piloop eval queue
retired: what runs finishes under it.
piloop eval cancel
piloop candidate remeasure). The candidate keeps its origin and its
scores. A baseline that never measured pauses its campaign’s measurements: ask for it, then resume.
Arguments:
CANDIDATE_ID: The candidate whose evaluation to cancel. [required]
piloop events
piloop status --json or piloop inbox --json), then the events after its cursor: nothing is
missed in between. Save the cursor after you have handled the events, and read from it again after a disconnect.
An event can come twice then: skip an id that you have handled.
Parameters:
--after INT: The cursor to read after: thenextof the last read, or thecursorof a snapshot. [default: 0]--campaign STR: Only the events about rows of this campaign.--kind STR..., --empty-kind: Only events of this kind. Repeatable. [default: ()]--limit INT: The most events to print. [default: 100]--follow: Wait for an event when there is none yet, up to —timeout.--timeout FLOAT: With —follow: seconds to wait. [default: 1800]--json: Print one JSON document on stdout, for a program. Messages go to stderr.
piloop history
[plugins.section.pack] says. Without a
campaign, it uses the campaign that the current directory is in, else the only active campaign, else every campaign.
Arguments:
REF: The campaign name, its id, or a path inside its repo.
piloop idea
Add an idea to the board, claim or propose one for your run, and change an idea: its status, links or track.piloop idea add
files key of a role says whether its agents may add ideas. The orchestrator and humans may add ideas. The
idea is signed as PILOOP_ACTOR. The idea and its links are written together, so the daemon never sees the idea
without them.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]TITLE: A short title for the idea. [required]
--hypothesis STR: Why this should help, and by how much. Default: the title.--plan STR: The steps for the implementer.--from STR: What prompted the idea, with ids or a URL. Example: “note comment#881: …”.--priority INT: From 0 (urgent) to 4 (someday). [default: 2]--track STR: The track it works on. Required when piloop.toml has more than one track.--after INT..., --empty-after: An idea id to wait for. Repeatable. A worker can claim the idea once all are done or dropped. [default: ()]
piloop idea claim
after link holds waits until its prerequisites are done.
It prints the idea’s hypothesis and its plan, which the board does not show, and, with several tracks, what the
idea’s track asks of your run. With --base, your run starts from that candidate: your checkout moves to it.
Without, a run that the campaign’s best (or trunk) passed since it was queued moves to the new one.
Arguments:
IDEA_ID: The idea. [required]
--base INT: The candidate that your run starts from, instead of the best: any candidate of the campaign. Your checkout moves to it, and your submissions build on it.
piloop idea propose
--base, your run starts
from that candidate: your checkout moves to it.
Arguments:
TITLE: A short title for the idea. [required]
--hypothesis STR: Why this should help, and by how much. Default: the title.--plan STR: The steps you take.--from STR: What prompted the idea, with ids or a URL.--track STR: The track it works on. Required when piloop.toml has more than one track.--base INT: The candidate that your run starts from, instead of the best: any candidate of the campaign. Your checkout moves to it, and your submissions build on it.
piloop idea status
open puts it back on the board, and dropped takes it off, which frees the ideas after it. Only a run makes an
idea done. A claimed idea has an open run: it can only be dropped, and its run finishes.
Arguments:
IDEA_ID: The idea. [required]STATUS: open or dropped. [required] [choices: open, claimed, done, dropped]
--reason STR: Why, with ids. It goes into the event or a note on the idea. [required]
piloop idea link
IDEA_ID: The idea. [required]KIND: after: wait until the target is done or dropped. [required] [choices: after]TARGET_ID: The idea it links to. [required]
--reason STR: Why, with ids. It goes into the event or a note on the idea. [required]
piloop idea unlink
after link to a prerequisite that is still open, to free the idea.
Arguments:
IDEA_ID: The idea. [required]KIND: after. [required] [choices: after]TARGET_ID: The idea it links to. [required]
--reason STR: Why, with ids. It goes into the event or a note on the idea. [required]
piloop idea track
IDEA_ID: The idea. [required]TRACK: A track of piloop.toml. [required]
--reason STR: Why, with ids. It goes into the event or a note on the idea. [required]
piloop inbox
ack: Acknowledge items to say that you have seen them.choose: Answer an escalation with one of its choices: adecisionreply signed as PILOOP_ACTOR, and an ack.reply: Answer an item with adecisionon the root of its thread,in_reply_tothe item, signed as PILOOP_ACTOR.show: Show the thread of a comment: its root in full, the replies with what each answers, then the citations.wait: Wait until something needs the orchestrator, print it one line per item, then print the command to wait again.
REF: The campaign name, its id, or a path inside its repo.
--kind COMMENTKIND..., --empty-kind: Only items of this kind. Repeatable. [default: ()]--all, --no-all: Show acknowledged items too.--json: Print one JSON document on stdout, for a program. Messages go to stderr.
piloop inbox show
COMMENT: The id of the item. [required]
piloop inbox wait
REF: The campaign name, its id, or a path inside its repo.
--timeout FLOAT: Seconds to wait before it returns with nothing new. [default: 1800]--after INT: The event id to start after: the cursor that the last wait printed. Default: now.
piloop inbox ack
decision comment on its target.
Arguments:
IDS: The ids of the items.
--up-to INT: Acknowledge every unacknowledged item up to this id instead. —campaign and —kind narrow it.--campaign STR: With —up-to: only the items of this campaign.--kind COMMENTKIND..., --empty-kind: With —up-to: only the items of this kind. Repeatable. [default: ()]
piloop inbox reply
decision on the root of its thread, in_reply_to the item, signed as PILOOP_ACTOR.
The answer is an inbox item of its own, so every orchestrator but you sees it in piloop inbox wait.
Arguments:
COMMENT: The id of the item. [required]BODY: The answer. [required]
--priority INT: From 0 (urgent) to 4 (someday). [default: 2]
piloop inbox choose
decision reply signed as PILOOP_ACTOR, and an ack.
Arguments:
COMMENT: The id of the escalation. [required]CHOICE: The id of one of its choices, such as A. [required]
piloop init
git init and makes a baseline commit. When there is no
piloop.toml, it writes piloop.toml, brief.md and evaluate.py from the template, and keeps the files that exist.
While evaluate.py is still the template stub, it stops and says what to edit. Then it starts the daemon, unless
one runs, registers the campaign with HEAD as its baseline candidate, and waits while the daemon measures it. A
baseline that fails to evaluate pauses the campaign, and init exits with why. Ctrl-C stops only the wait: the
campaign stays registered. For a campaign that is registered already, it reads piloop.toml again.
Arguments:
PATH: The campaign directory. [default: .]
--example STR: Write a bundled example instead of the blank template: enwik8, titanic-tracks, inference.--name STR: Register the campaign under this name, not thenameof piloop.toml.
piloop install-skills
piloop upgrade run this command.
piloop launch
max_concurrent.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]ROLE: The role of the agent: one that a package adds, which starts its agents itself. The daemon launches the agents of a role that does runs by itself, one for each queued run. [required]
--harness STR: Use this harness instead of the rotation.--model STR: The model id, as the harness names it.--reason STR: Why you request the agent. The agent’s brief includes it. [default: requested from the CLI]
piloop limits
set: Set a live key. It wins overconfig.tomlat once, and holds untilpiloop limits unset.unset: Remove a limit:config.tomlholds again at once.
piloop limits set
config.toml at once, and holds until piloop limits unset.
The value is JSON (1, null, 1.5), or else text.
Arguments:
ASSIGNMENT:KEY=VALUE:executor.pools.serve.slots.evaluation=1. [required]
--reason STR: Why: it shows next to the value. [required]
piloop limits unset
config.toml holds again at once.
Arguments:
KEY: The key of the limit. [required]
piloop measurement
Record a measurement made outside the daemon.piloop measurement add
metrics takes the metrics of piloop.toml, all of them unless error says why the
evaluation failed. seconds and error are optional. The output says where the candidate stands now. The
measurement is signed as PILOOP_ACTOR.
Arguments:
CANDIDATE_ID: The candidate that was measured. [required]
--report PATH: A JSON file: {“metrics”: {“<name>”: <value>}, “seconds”: <s>, “error”: “<why>”}. [required]
piloop message
piloop inbox wait.
The orchestrator answers with piloop inbox reply, and the answer is in your inbox.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]BODY: What to say. [required]
--seat INT: Address a numbered orchestrator seat.--priority INT: From 0 (urgent) to 4 (someday). [default: 2]
piloop migrate
migration_backups in config.toml). Only this command, piloop serve when it starts and piloop upgrade migrate. Every other command
refuses a database at another schema revision, and says what to run. It refuses to migrate under the running
daemon of an older piloop, and refuses an agent that the daemon launched.
piloop orchestrate
SEAT: [required]COMMAND: [required]ARGS:
piloop pause
piloop resume ends the pause.
The daemon queues no run, requests no role and launches no requested row. Running work goes on, and its commits
are scored. The daemon still
measures again what a new evaluator or piloop candidate remeasure needs, so the pause can end on a measured best.
--evals holds those measurements too. The pause is in the database: it holds wherever you run the command.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]
--reason STR: Why, with ids: what the pause waits for. [required]--evals, --no-evals: Hold the measurements that the daemon starts too: after a new evaluator, or asked.
piloop plugins
piloop prompt
AGENT_SESSION_ID: The id of the agent, aspiloop statuslists it. [required]TEXT: The message. [required]
piloop restart
piloop serve. The new start
re-attaches to every agent and finishes their runs. The process keeps its pid and its environment, so systemd,
launchd or the terminal that started it still holds it. To change the environment of a service unit, use the
restart of the service manager.
Parameters:
--timeout FLOAT: Seconds to wait for the daemon to start again. [default: 30]
piloop restore
./workspace/.
The daemon archives a settled subject’s workspace files, such as a done idea’s, and what is left when a campaign
stops, into the artifact store and removes the local copies. This brings them back from the local store or its
remote. A file that is already there with other content is kept, never overwritten.
Arguments:
REF: The campaign name, its id, or a path inside its repo. [required]TARGET: A subject (idea#12, or12for an idea): its files; else a workspace-relative path: it or everything under it. Left out: every archived file.
piloop resume
REF: The campaign name, its id, or a path inside its repo. [required]
piloop run
Act on one run.piloop run cancel
--wrap-up, after it was told to save its work and stop. The run
closes as cancelled, unless the implementer ran piloop run end before the daemon ended it: a later end is
refused. Its commits are scored, and its idea is open again: drop it to take it off the board.
Arguments:
RUN_ID: The id of the run. [required]
--wrap-up: Tell the agent to save its work and stop first, and end it 10 minutes later.
piloop run extend
--by later, also on a worker elsewhere, and a note tells it its new deadline. Extensions add up.
Arguments:
RUN_ID: The id of the run. [required]
--by TIMEDELTA: How much more time, such as1hor90m. [required]
piloop run end
submitted if it submitted a version, else as gave_up.
submitted settles your idea as done once your work is scored: in a campaign that scores what you submit, only
after a piloop submit. gave_up puts your idea back on the board, with your reason if you give one.
Arguments:
HOW: submitted: your work is done. gave_up: you stop without a result. [required] [choices: submitted, gave-up]
--reason STR: Why you give up, with ids.
piloop schema
orchestration. The examples name no campaign, and say what the default vcs provider writes.
Arguments:
NAMES: The guides to print, such asprovenanceorqueries. Without one, every guide, then every table.
piloop secret
The secrets that agents get in their environment. No command shows a value.piloop secret set
printf %s "$KEY" | piloop secret set EXA_API_KEY.
On a terminal, it asks for the value and does not show it. Agents get the value from their next start. An agent
sets only its own campaign’s secrets.
Arguments:
NAME: The name of the secret: the variable that agents get it in. [required]
--campaign STR: The campaign whose secret it is, over the home’s of the same name. Unset: the home’s.
piloop secret list
piloop secret rm
NAME: The name of the secret: the variable that agents get it in. [required]
--campaign STR: The campaign whose secret it is, over the home’s of the same name. Unset: the home’s.
piloop serve
--detach, --no-detach: Start the daemon in the background. Its output goes to serve.log.--check, --no-check: Check that the daemon can start (its plugins, and what config.toml binds), and start nothing.--listen STR: Serve other machines on HOST:PORT ([plugins.network] listen). An address that is not loopback needs TLS. Port 0 takes a free port, whichpiloop restartkeeps.piloop statusshows the URL.
piloop service-unit
piloop serve running.
It prints the unit only, and installs nothing. The unit carries the variables that the homes of the installed
harnesses and of the registered campaigns’ harnesses name.
piloop sql
team.
These are denied: schema changes outside team, ATTACH, transactions, and writes to alembic_version and
session_actor. In team, CREATE and DROP of a TABLE, an INDEX or a VIEW, and ALTER TABLE, are allowed. Only
the PRAGMAs that describe the schema are allowed. A statement runs for at most 5 s and team grows to at most
256 MiB ([sql] in config.toml). actor() returns whom the statement signs as. A query prints at most 500 rows.
With -, the statement is read from stdin: piped in from a quoted heredoc (<<'EOF'), an agent’s text reaches
the database as written, where a double-quoted argument would let the shell run what is in backticks or $(…)
first.
Arguments:
STATEMENT: One SQL statement, or - to read it from stdin. [required]
--campaign STR: The campaign whose team tables are attached: its name or id. By default the only campaign that is not retired, else the one cwd is in. An agent’s are always its own campaign’s.
piloop status
config.toml or a limit sets, then each campaign.
Each campaign shows the sections of its [plugins.section] use: by default the best, the goal and the progress against
the stop rule, the tracks, the trajectory, the open runs, the queue, the live agents with their last line, the
evaluations, the recent candidates, the incidents that agents got, the inbox and the recent events. Without a campaign, it uses
the campaign that the current directory is in, else the only active campaign, else every campaign but the retired
ones (--status).
With —json, it prints the daemon’s pid and the URL it listens on, and the main facts of each campaign, read at one
cursor: follow them with piloop events --after <cursor>.
Arguments:
REF: The campaign name, its id, or a path inside its repo.
--status CHOICE...: Without a campaign, list those of this status. Repeatable. [choices: active, stopped, retired] [default: (active, stopped)]--json: Print one JSON document on stdout, for a program. Messages go to stderr.
piloop stop
piloop run end
ends as it said instead: the next daemon scores its commits.
Parameters:
--timeout FLOAT: Seconds to wait for the daemon to exit. [default: 45]
piloop store
The artifact store that archived workspace files live in: what it holds, eviction, checks.piloop store status
piloop store evict
[plugins.cas] says; the daemon does it hourly too.
piloop store verify
REF: The campaign name, its id, or a path inside its repo.
piloop submit
[piloop] message.
piloop runs the campaign’s evaluate command on the commit, and scores it into the campaign’s pool. Keep working
meanwhile. The message gives its score and its gain over its parent, your line’s best and the campaign’s best. A
commit whose first score beats the best is evaluated again until it is confirmed, then it can be the best. A
campaign can cap the submissions of a run ([evaluator] submissions). A submission is for one of your claims, by
default your newest: when the run ends, an idea is done once a submission for it has a score.
Arguments:
REVISION: The commit to submit. Default: the one that your checkout is at.
--idea INT: The claim that it is for. Default: your run’s newest claim.
piloop token
The bearer tokens ofpiloop serve and piloop cas serve.
piloop token create
NAME: The name of the caller that uses it, such as a worker. [required]
--access CHOICE: What its caller may do. [choices: read, act, admin, worker] [default: worker]
piloop token list
piloop token revoke
NAME: The token to revoke. [required]
piloop upgrade
uv tool upgrade --reinstall-package piloop piloop. Then the new code runs piloop install-skills. A running
daemon restarts in place, as with piloop restart: its agents keep running, and the new code migrates the
database and re-attaches to them. When no daemon runs, the new code migrates the database and the daemon stays
stopped. A checkout installed with uv sync is not a uv tool: upgrade it with git pull. It refuses an agent that
the daemon launched.
Parameters:
--timeout FLOAT: Seconds to wait for a running daemon to restart. [default: 30]
piloop watch
? lists the keys of the focused panel, / filters
it, esc goes back to every campaign and q quits. It reads the API, so it works with PILOOP_SERVER too. Writes are
signed as PILOOP_ACTOR.
Arguments:
REF: The campaign name, its id, or a path inside its repo.
--mouse, --no-mouse: Take the mouse. —no-mouse leaves it to the terminal: a multiplexer can misread the mouse of the app. [default: True]
piloop worker
list: List each worker: its pool, when it was last heard, its host sample, its jobs, and why it got no lease.
--server STR: The URL of the server thatpiloop serve --listenruns. [required]--pool STR: The pool of the server whose slots this machine has. [required]--once, --no-once: Take one lease, run its job, and exit.--orphan-exit FLOAT: Exit after this many seconds without an answer of the server, once no job runs.