Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

fleet agent

fleet agent is the agent’s front door: enrol an agent of any kind, check what this seat reaches, and take the next piece of work down the intake ladder. The fleet already has the legs — bridge mailboxes, the queue, the laptop transport, GitHub, secrets by name; what a new kind of agent lacked was one place to enroll, check its seat, and take work. fleet agent is that place. Its sibling domain fleet shell rides on the same agent capability — there is no separate shell capability atom.

Every verb prints one JSON object. Exit codes for the domain: 0 ok · 2 usage · 3 a needed leg is down · 5 no work on any rung (next only).

See also Agents: enrolment, doctor and the intake ladder and fleet bridge.

Help: fleet agent <verb> --help prints that verb’s own usage — its synopsis, a short description, and the shared output/exit-code footer. An unknown verb (or no verb) falls back to the shared domain USAGE. The per-verb sections below are written from source semantics.

fleet agent kinds

fleet agent kinds
FlagArgumentDefaultMeaning
———Takes no arguments and no flags.

Behaviour

Prints the kind table as JSON: for each kind its name, summary, bridge groups, seat, and enrolment note, plus the three seat definitions. A kind says three things: which bridge groups it joins, how it reaches the fleet from where it runs, and what to tell it at enrolment. Adding a kind is adding a row; no verb changes. The 16 kinds:

KindGroupsSeatNote (abridged)
musemusebinaryFresh Muse gets a bridge-capable static build from scripts/muse/bootstrap.sh; older installs run the same commands on the laptop install via ~/tools/laptop-ssh.sh
opencodeopencodebinaryRuns on the laptop seat, so every leg is local
openchamberopencode, openchamberbinaryJoins opencode too, so group:opencode reaches both pipelines
openclawopenclawbinary—
claude-codeclaude-codebinaryA cloud session has no tailnet: messaging and the priority rung work over HTTPS; builds go through fleet shell
codexcodexbinary—
geminigeminibinary—
antigravityantigravitybinary—
grokgrokbinaryA bot with no shell enrolls as kind http under the same name and groups
dotdothttppkgs/dot-bridge carries its Slack and ChatGPT transports; the mailbox is the same store
duetduethttp—
claude(none)connectorFixed bridge address claude; set a wake hook for channel:claude so a send starts a session
chatgpt(none)connectorFixed address chatgpt; woken by its MCP Events subscription
laptoplaptopbinaryA job or service on the fleet laptop
http(none)httpAnything that can make an HTTPS request and nothing else
generic(none)binaryAny other agent with a shell — the fallback enroll names in its unknown-kind error

Seats: binary = has a shell and runs the fleet binary itself (enroll, then next); http = no shell of its own, speaks the bridge’s fleet routes over HTTPS (scripts/fleet/bridge-mailbox.py is the reference client) and gets work from its mailbox; connector = a chat assistant with the Message Bridge connector attached — it has a channel address, not a mailbox.

Exit codes

0 ok · 2 usage.

Example

$ fleet agent kinds

Prints all 16 kinds with their groups, seats, and enrolment notes as one JSON object.

fleet agent enroll

fleet agent enroll --kind K --name N [--groups a,b] [--dry-run] [--profile PATH]
FlagArgumentDefaultMeaning
--kindKrequiredOne of the 16 kinds (see kinds). An unknown kind is a usage error listing all kinds, with “use generic for anything with a shell”.
--nameNrequiredThe agent’s name (its bridge mailbox name). The shared USAGE spells this --name; the domain help line abbreviates it as the enroll line’s second value.
--groupsa,bkind’s built-in groupsAdditional bridge groups; adds to the kind’s groups, never replaces them.
--dry-run—offProbe nothing and register nothing.
--profilePATHdefault profile pathWhere to save the profile.

Behaviour

Registers an agent and saves its profile. Flow: the kind is validated; --groups adds to the kind’s built-in groups; for a binary/http seat the bridge leg is probed in Register mode — bridge hello with the name and groups, which is what actually registers the mailbox; connector kinds instead get the “attach the connector” instruction and a fixed channel address. The four legs are probed (see doctor) and the saved profile records agent, kind, groups, and leg state.

The JSON answer carries: the profile, registered (true only when not a dry run and the bridge leg answered), the legs, the rungs map, and seat-specific next-step lines — for a binary seat the run loop (fleet agent next --agent <name>, do the task, run its then lines, repeat while the run has budget) and the fleet shell line (“runs where builds belong; never build in a limited sandbox”); for an http seat the token-by-name note and the reference-client commands; for central, the fleet bridge send --to <address> [--command] lines.

Exit codes

0 — a dry run, or any intake rung is live. 2 — usage (including an unknown kind). 3 — no intake rung is live.

Example

$ fleet agent enroll --kind generic --name worker-1

Registers worker-1, probes its four legs, and saves its profile with the run-loop instructions.

fleet agent doctor

fleet agent doctor [--agent N]
FlagArgumentDefaultMeaning
--agentNprofile / $FLEET_AGENTAgent name to probe the bridge leg as. With no name known, the bridge leg is reported not ok even when the service answers.

Behaviour

Checks which legs answer from this seat. The four legs are bridge, queue, github, shell — there is no secrets leg; secrets is folded into the bridge leg’s stated need (“HTTPS to the message bridge, and the fleet token by name through fleet secrets”). The four probes are independent and are issued together (one parallel call), each a real fleet verb run as this seat:

LegProbe“Up” detailWhat it needs
bridgebridge hello (enroll) / bridge inbox --agent A --limit 1 (doctor with a name) / bridge health (no name known)“registered” / “the mailbox answers”HTTPS to the bridge + the fleet token by name through fleet secrets
queuequeue health“answers”The queue broker: its socket on the laptop, or the laptop transport from elsewhere
githubgh api rate_limit via fleet gh; if that fails, plain signed-in gh api rate_limit“answers”, with route: "fleet" or "plain" recordedgh with a token: fleet gh’s rotation, or a signed-in gh
shelllaptop-agent health“the laptop answers”A route to the laptop: its broker, the Cloudflare tunnel, the tailnet or ssh

Doctor’s bridge probe with a known agent is a read that takes nothing (inbox --limit 1): service health alone proves nothing about whether this seat holds the fleet token, so only a call made as an agent counts. With no agent name, the bridge leg is reported not ok even when the service answers (“the service answers, but no agent name is known to read a mailbox with: enrol, or pass –agent”).

From the legs, doctor derives the rungs map — which intake rungs this seat still has: push = bridge leg, queue = queue leg, shortlist = always true (it is a local file), priority = github leg. The answer also reports builds: “fleet shell reaches the laptop” when the shell leg answers, else “fleet shell has no laptop route from here; it will try a codespace, then run here”.

Exit codes

0 — any intake rung is live (bridge, queue or github). 2 — usage. 3 — no intake rung is live.

Example

$ fleet agent doctor --agent archer

Probes all four legs in parallel and prints the legs, the rungs map, and the builds line as one JSON object.

fleet agent next

fleet agent next [--agent N] [--lane L] [--repo OWNER/NAME] [--low-water N] [--shortlist PATH] [--platform P] [--pool P] [--remaining-budget-minutes N] [--filter EXPR] [--queue Q] [--no-push] [--no-queue] [--no-shortlist] [--no-priority]
FlagArgumentDefaultMeaning
--agentNprofile / $FLEET_AGENTAgent taking the work.
--laneLderived from the agent nameQueue lane for the queue rung’s claim.
--repoOWNER/NAMEdeveloping-today/codeRepo the priority/shortlist rungs draw from.
--low-waterN3Shortlist low-water mark for this call.
--shortlistPATHprofile/state defaultShortlist file path.
--platformP—Carried into the queue claim.
--poolP—Carried into the queue claim.
--remaining-budget-minutesN—Carried into the queue claim.
--filterEXPR—Carried into the queue claim.
--queueQ—Queue name for the queue rung’s claim.
--no-push—offSkip rung 1 (recorded as skipped in tried).
--no-queue—offSkip rung 2.
--no-shortlist—offSkip rung 3.
--no-priority—offSkip rung 4.

Behaviour

Tries four rungs in order and returns the first that yields work. A rung that is down (bridge unreachable, broker not answering) is not the same as a rung that is empty: down rungs are recorded and skipped, so a seat with only HTTPS still gets work from rungs 1 and 4. Every answer is {agent, rung, task, then, tried} — tried is the per-rung log (skipped/empty/down/rejected with a why), and then is the list of follow-up commands the runner should execute for the handed-out task.

  1. Push — a command addressed to this agent on the bridge (bridge inbox --commands --take). This rung outranks everything: a command a person (or central) pushed is work already chosen.
  2. Queue — a claim on the one fleet queue (queue claim with the agent’s lane; the lane defaults from the agent name — known lane families are validated by the queue, and a lane registered to a shared queue worker is honoured). next claims with a 4-hour lease (14400 s, overriding the queue’s 45-minute default, which lapses mid-task) and the task’s then lines name the lease deadline plus the queue checkpoint / queue complete commands with the claimed worker/lane. A broker refusal that is really a lane verdict (lane bound to another queue, registration did not land) is reported as rung rejected, distinct from down.
  3. Shortlist — the top of this host’s local shortlist: entries are re-checked against GitHub before hand-out (an issue closed, assigned or owner-parked since listing is dropped with a named why), then handed out in rank order. Refill switch: if the list is at or below low-water with nobody refilling, next does not hand out a stale remnant — it returns rung refill instead, a purpose-switch task (purpose: "refill-shortlist", target 8) whose instructions and then lines are the shortlist fill / shortlist add commands. One run refills; the marker it leaves keeps the rest working.
  4. Priority — the highest-priority open issue straight from GitHub. Label queries run soonest-first over the priority label family (priority/critical, then priority/high, … — the same ordering as the shortlist ranks); candidates are filtered (owner-parked labels — user/owned, user/review, user/escalated class — are kept out), and the winner is reserved into the shortlist file as it is handed out, so two seats on one host do not take the same issue.

Exit codes

0 — a rung yielded work. 2 — usage. 3 — a needed leg is down (domain-level). 5 — no work on any rung.

Example

$ fleet agent next --agent archer
{"agent": "archer", "rung": "queue", "task": {…}, "then": […], "tried": […]}

Returns the first available work down the ladder, with the follow-up commands in then.

fleet agent shortlist status

fleet agent shortlist status [--low-water N]
FlagArgumentDefaultMeaning
--low-waterN3Low-water mark for the low computation.
--shortlistPATHprofile/state defaultShortlist file path (shared shortlist flag).

Behaviour

Reports the local list next draws on: a JSON file on this host, guarded by a lock file (stale after 30 s). Entries are {repo, issue, title, rank, why, added_at} plus handed-out records and an optional refill marker. status prints the list, its count, low (count ≤ low-water — so a list of exactly 3 is already low), and the refill state. Defaults: low-water 3, target 8.

Ranks (lower is sooner): expedite → 0, priority/critical → 1, now → 2, priority/high → 3, next → 4, priority/normal → 5, anything else unranked = 6. Hand-out order is lowest rank, then oldest added_at, then lowest issue number.

Exit codes

0 ok · 2 usage · 3 a needed leg is down.

Example

$ fleet agent shortlist status

Prints the entries, the count, whether the list is low, and the refill state.

fleet agent shortlist take

fleet agent shortlist take
FlagArgumentDefaultMeaning
--shortlistPATHprofile/state defaultShortlist file path (shared shortlist flag). This verb takes no verb-specific flags.

Behaviour

Hands out the soonest entry to this agent — the same selection next rung 3 uses (lowest rank, then oldest, then lowest issue number). A handed-out issue is kept from being handed out again on this host for 2 h (7200 s); pruning drops expired handed records and expired refill markers.

Exit codes

0 ok · 2 usage · 3 a needed leg is down · 5 no work (empty list) by the domain’s next-family convention.

Example

$ fleet agent shortlist take

Hands out the soonest shortlist entry as one JSON object.

fleet agent shortlist clear

fleet agent shortlist clear
FlagArgumentDefaultMeaning
--shortlistPATHprofile/state defaultShortlist file path (shared shortlist flag). This verb takes no verb-specific flags.

Behaviour

Empties the list and clears the refill marker.

Exit codes

0 ok · 2 usage.

Example

$ fleet agent shortlist clear

Empties the local shortlist and clears any live refill marker.

fleet agent shortlist add

fleet agent shortlist add --issue N --title T [--repo R] [--rank N] [--why TEXT]
FlagArgumentDefaultMeaning
--issueNrequiredIssue number to add.
--titleTrequiredIssue title recorded on the entry.
--repoRdeveloping-today/codeRepository the issue belongs to.
--rankN6 (unranked)Rank for hand-out order (see status for the rank table).
--whyTEXT—Why this entry was listed.
--shortlistPATHprofile/state defaultShortlist file path (shared shortlist flag).

Behaviour

Adds one entry {repo, issue, title, rank, why, added_at}. Duplicates (same repo+issue already listed) are refused — the add returns false rather than listing the issue twice.

Exit codes

0 ok · 2 usage.

Example

$ fleet agent shortlist add --issue 13165 --title "Write the fleet book" --rank 1

Adds issue 13165 at rank 1 (priority/critical rank).

fleet agent shortlist fill

fleet agent shortlist fill [--repo R] [--target N]
FlagArgumentDefaultMeaning
--repoRdeveloping-today/codeRepository to draw candidates from.
--targetN8 (clamped 1–50)Top the list up to this many entries.
--shortlistPATHprofile/state defaultShortlist file path (shared shortlist flag).

Behaviour

Tops the list up to target from the priority candidates: it fetches 2× target candidates from GitHub (the same candidate scan as next rung 4), adds them in rank order until the target is met, records the fill (so a just-filled list suppresses an immediate second refill), and clears the refill marker. Refill bookkeeping: a refill marker (by, at) lasts 30 min (1800 s); a list needs refill when it is low, no marker is live, and no fill finished within the window.

Exit codes

0 ok · 2 usage · 3 a needed leg is down (GitHub unreachable).

Example

$ fleet agent shortlist fill

Tops the local shortlist up to 8 entries from the priority candidates.