exec away from doing real work. Claude Code and Codex are signed in on your private machines once you sign in for the organization, and OpenCode needs a login on each machine. Machines boot in under 10ms and cost near zero when idle, which makes spawning a machine per worker feel like calling a function.
Three scouts research in parallel, one machine each, then a lead agent reads all three reports and writes the recommendation.
How it works
- The coordinator (your script, or an agent on a boxd machine) defines the sub-tasks.
- It creates one machine per worker, fresh or forked from a warm source machine.
- Each worker runs a coding agent headless inside its machine, and the output comes back through
exec. - A lead step reads every report and writes the synthesis.
- Workers are deleted, and the fleet goes back to zero.
Full example
Three scouts research the same question through different lenses, then a lead agent reads all three reports and produces one recommendation:- TypeScript
- Python
Share state over the private network
Workers can do more than report back at the end. Inside any of your machines,<machine>.boxd resolves to that machine’s private IP, so a swarm can share a queue, a database, or a scoreboard by running it on one machine and letting the others connect by name:
Let the swarm run itself
The coordinator can be a machine too. Every machine except an isolated one carries the in-machineboxd CLI and the SDKs. Inside a private machine they act as the machine’s owner, so an agent inside one machine can create siblings, hand them work, and clean up. The example above runs unchanged on a boxd machine, where Boxd() needs neither a key nor configuration.
Good to know
Warm-start workers with a fork
A fresh machine is generic, and a worker that needs your repo, dependencies, or a loaded model should start from a prepared source machine instead. Set up a source machine namedbaseline once, then fork it for each worker with machines.fork. Each fork lands in under 200ms with the source machine’s disk and memory intact. For a starting state that outlives the machine, snapshot it, and for identical starting states at scale see Reproducible RL environments.
Keep workers apart
Independent attempts should stay independent, and workers running generated code should not reach their siblings. Networks partition the swarm, and each worker then reaches the coordinator and nothing else:--isolated and they reach nothing of yours beyond networks you grant explicitly. See Sandboxes.