Skip to content

Neutrinos: the cloud fleet

Status: Tier 4. Code: worker src/lib/fleet-*, src/channels/box-gateway.ts, src/do/fleet-do.ts, src/cron/fleet-reaper.ts; boot script box-runner.mjs in fermi-daemon. Verified at 100 concurrent agents.

A neutrino is a disposable EC2 box born for one task: it boots, claims its task from the Worker, runs a coding harness, uploads evidence, satisfies a machine-checked proof contract, and terminates. You never SSH into one. You never keep one.

Lifecycle

How a launch flows through the system

  1. Any MCP host (or the daemon, or another agent) calls cloud_agent_launch with:
jsonc
{
  "prompt": "Add a gradient() function to testbed with tests",
  "proof_contract": "{\"kind\":\"artifact\",\"name\":\"out.diff\",\"min_bytes\":1}",
  "route": "claude",          // or "codex" | "grok"
  "budget_usd": 0.25,          // soft cap, EC2 wall-clock only
  "ttl_seconds": 3600,
  "skills": ["github-api"],    // Fermi skills preloaded into the box context
  "sessions": ["gmail"],       // web sessions the box may lease — named or nothing
  "repo": "you/testbed", "branch": "agent/gradient"
}
  1. The Worker enqueues the task on a private queue agent:<id>, checks max_concurrent and the monthly budget, and calls EC2 RunInstances (signed with your AWS keys from the secrets store, via aws4fetch — no SDK). User-data contains only the pinned fetch: download box-runner.mjs at a specific commit SHA, verify its sha256 against the pin, refuse to run otherwise.
  2. The box authenticates every call with its per-box token <box_id>.<secret> (hashed at rest) against the /box/* gateway: poll → claim the task, heartbeat, artifact (upload evidence to R2), inference-auth (fetch the Claude OAuth token), session-lease (broker handle, never cookies), complete, report (crash telemetry — every fatal path phones home).
  3. The runner sets the git identity to fermi-neutrino — machine commits are visibly machine commits — runs the chosen harness, auto-generates out.diff if the agent forgot, and self-checks the proof contract locally before submitting, running one corrective pass if it would fail.
  4. /box/complete re-checks the proof contract server-side (lib/proof-contract.ts). done without satisfiable proof → HTTP 422, task stays claimed, the box may fix its work or fail honestly. Honest failure is always accepted.
  5. The reaper cron (every 5 min) terminates TTL-expired boxes and only marks them destroyed after EC2 confirms.

Proof contracts

Free-text "definition of done" invites confident lying ("Agents lie"). Contracts are structured JSON, checked mechanically:

kindChecked by workerExample
artifactexistence, min_bytes, sha256 in R2{"kind":"artifact","name":"out.diff","min_bytes":1}
httpexpect_status, body_matcheshealth endpoint returns 200
testunverifiable worker-side → completes tagged completed_unverified for orchestrator replay{"kind":"test","cmd":"npm test"}
domsame as testselector/text match on a page

Legacy free-text contracts are grandfathered; new launches should always pass structured JSON.

What access this tier needs (and nothing more)

GrantWhyScope it
AWS access key pairRunInstances/TerminateInstances/DescribeInstancesIAM policy limited to those actions, one region, your fleet security group
CLAUDE_CODE_OAUTH_TOKEN in Fermi secretsboxes inference on your existing Claude subscription — inference is not billed to the budget, EC2 wall-clock isit's your sub; rotate from your Anthropic account
GITHUB_TOKEN in Fermi secretsclone/push/PRfine-grained token, only the repos agents work
fleet:config in KVregion, instance type, max_concurrent, monthly_budget_usd, runner_ref+runner_sha256, TTLsset via fleetctl or KV directly

Cost intuition: a t3.small is $0.0208/hr. The 100-agent run (~6 minutes median per box) cost about $1.60 of EC2 and zero marginal inference.

Operating it

bash
fleetctl pin-runner        # after ANY box-runner.mjs change — launch refuses unpinned
cloud_agent_launch ...     # from any host
cloud_agent_list / get     # status, exit_reason, accrued cost, inference telemetry
cloud_agent_followup       # send a follow-up prompt to a live box
cloud_agent_stop / destroy # manual kill switch

Failure modes

SymptomCauseFix
launch refuses: runner not pinnedintendedfleetctl pin-runner
Box never boots, no reportCDN throttled the runner fetch under burstfixed: runner fetch retries 4× ; check /box/report telemetry
422 proof_unverified loopscontract genuinely unsatisfiablefix the contract, or let the box fail honestly
Fleet tasks claimed by your Macancient workerupdate — fleet queues are drain-isolated
Cost above budgetsoft cap raced between pollsbudgets bound expected spend; TTL bounds worst case

MIT licensed. Built for people who want to own their agent.