agentsctl instance commands
agentsctl starts an isolated copy of Agents against the test database, drives it as a person would, and keeps evidence of what it did. Run bin/agentsctl from the repo root with Node 24 first on the PATH. With no command it prints a dashboard of the instances in the checkout, the latest evidence folders, and what to try next. bin/agentsctl help lists every command, and bin/agentsctl <command> --help lists a command’s flags.
What every command shares
Section titled “What every command shares”Every command takes these flags.
| Flag | What it does |
|---|---|
--instance <value> |
The instance to act on. The default is the only one in this checkout. |
--json |
Print one JSON envelope instead of text. |
--full |
Show long output whole instead of cut. |
--help |
Show the command’s flags. |
--dry-run |
Check the command line and its target, and run nothing. |
Output goes to stdout. The exit code says whether the command worked.
| Code | Meaning |
|---|---|
0 |
Done. |
1 |
Failed, and safe to retry once the cause is fixed. |
2 |
Usage error. |
3 |
Refused, with nothing changed. |
Where it runs and what it keeps
Section titled “Where it runs and what it keeps”agentsctlreads.envand then.env.testfrom the repo root, with the real environment over both. It refuses to go on unlessDATABASE_URLandELECTRIC_URLare the ones.env.testnames and the database name ends in_test.- It refuses an
AGENTS_PEOPLE_SOCKEToutside its own scratch folders, because that socket could be the live server’s. - An instance takes ports from 8020 to 8039. It never uses the live ports 7700, 7701, 7710, 4437 and 3000.
- Instance state is in
.scratch/verify/instances, evidence in.scratch/verify/evidence, and visual baselines in.scratch/verify/baselines. - An instance’s scratch folder is named
agentsctl-<instance>-followed by random characters. It is under/tmpon macOS, and under the temporary folder elsewhere. - Each process an instance starts gets only the environment it needs. Only the API and the admin script get the database URL.
upseeds the team with the peopleadaandben, agents on the instance’s machine, and the machine itself.
Commands
Section titled “Commands”Starts an isolated Agents on ports 8020 to 8039, against the test database.
| Flag | What it does |
|---|---|
--port <value> |
The first of its three ports. |
--claude <value> |
The harness that runs the agents. fake is the default and runs the scripted harness. real runs real Claude sessions. |
--pipelines |
Also set up the forge org and the pipelines. |
--github |
Also start the stand-in GitHub, from test/fake-github.ts, and point the API at it. |
--auth <value> |
How the instance knows a person. tailscale, the default, passes each login in the Tailscale-User-Login header. native signs people in with a password and a code, as gomoe.dev does, and agentsctl signs each one in. |
--tailscale |
Also start the stand-in Tailscale, from test/fake-tailscale.ts, with its key saved, so the instance starts connected with no invite open. Without it Tailscale is off. |
--box-idle-min <value> |
The minutes a box may sit with nothing to do before the runner stops it, such as 1, passed to the API as AGENTS_BOX_IDLE_MIN. Off by default, so the API’s 30 minutes hold. |
--no-build |
Serve the app as last built. |
preview
Section titled “preview”Serves this checkout’s app on 127.0.0.1 with live updates, signed in to the instance, until Ctrl+C. Starts the instance if none runs. With --json it prints one envelope when it is up and one when it ends.
| Flag | What it does |
|---|---|
--as <value> |
Who is signed in. One of ada (the default), ben, a name given to seed person, or a full login. |
--no-seed |
Leave a team with no tasks as it is, with no sample repo or task. |
doctor
Section titled “doctor”Checks, without changing anything, that the instance is usable.
Stops what the instance started and removes its team. The instance’s evidence stays.
| Flag | What it does |
|---|---|
--keep-data |
Keep its team, repos and boxes, until down runs again without it. |
Lists the instances in this checkout.
Fields are name, phase, ports, claude, pipelines, evidence. The output shows name, phase, ports unless --fields names others.
| Flag | What it does |
|---|---|
--fields <value> |
The fields to show, comma separated. |
evidence
Section titled “evidence”Lists what the instance’s run did, from its evidence folder.
Fields are at, command, ok, summary. The output shows command, ok, summary unless --fields names others.
| Flag | What it does |
|---|---|
--fields <value> |
The fields to show, comma separated. |
Doctor checks
Section titled “Doctor checks”doctor runs these checks in order and changes nothing. It fails when any check fails.
| Check | What it looks at |
|---|---|
phase |
The instance is ready. |
test database |
The database URL is the one .env.test names, or the check slot’s own. |
not live |
None of the instance’s ports is a live port (7700, 7701, 7710, 4437 or 3000). |
<role> process |
Each process the instance started, other than a browser session, is still running. |
browser session |
Whether the browser session runs. It passes either way, since the next browser or desktop command starts one. |
machine door, people door, stream server |
The instance’s own process listens on each port. |
people door answers |
GET /v1/me names the instance’s owner and team. |
Electric |
The agents shape lists every agent the database holds. |
machine token |
The machine’s token reads its command queue. |
daemon online |
The instance’s machine is online and was seen within 35 seconds. |
daemon takes commands |
No command has waited more than 30 seconds in the machine’s queue. |
app served |
GET / answers 200 with the page titled Agents. |
app usable |
The app renders its workspace in a browser. |
app build |
app/dist is newer than app/src. |
harness |
The instance has its fake harness’s scenario, or runs real Claude sessions. |