Skip to main content
A swarm splits a problem across many worker agents and merges their findings into one answer. On boxd, each worker gets a full machine of its own, with Claude Code, Codex, and OpenCode pre-installed, so a worker is one 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

  1. The coordinator (your script, or an agent on a boxd machine) defines the sub-tasks.
  2. It creates one machine per worker, fresh or forked from a warm source machine.
  3. Each worker runs a coding agent headless inside its machine, and the output comes back through exec.
  4. A lead step reads every report and writes the synthesis.
  5. 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:
The workers need nothing installed first, because the agents are pre-installed on every machine. Once you sign in to Claude Code for the org, the login is served to every private machine you have in it, new machines included. See Coding agents.

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:
Name resolution is private to you, and only machines you own resolve. See Machine to machine.

Let the swarm run itself

The coordinator can be a machine too. Every machine except an isolated one carries the in-machine boxd 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 named baseline 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:
For untrusted work, create workers with --isolated and they reach nothing of yours beyond networks you grant explicitly. See Sandboxes.

Mind the cost and the cap

Delete workers when their task ends, since a deleted machine costs nothing. Workers you keep for the next batch hibernate on their own and wake on the next request. The cap is 50 machines per organization by default, extendable on request, and the coordinator counts too. See Resources and limits.