
config.yaml.
BoxdSandboxProvider makes that sandbox a boxd machine. Each user and thread gets its own isolated machine. It is in DeerFlow’s main branch (pull request) and not in a tagged release yet, so install DeerFlow from main.
Set up
1
Clone DeerFlow
make setup writes config.yaml and .env with a model for the agent. Or copy config.example.yaml to config.yaml and add a model yourself.2
Create an API key
.env, with UV_EXTRAS=boxd so make dev keeps the boxd SDK installed when it syncs dependencies:3
Pick the provider
In An unknown region or a size boxd does not offer fails when the provider starts, before any machine is created.
config.yaml, replace the sandbox: section:4
Start DeerFlow
make dev reads UV_EXTRAS from .env and installs the boxd SDK with the other dependencies. Every thread’s shell commands and file tools now run on its own machine.Try it without a model
The agent calls the provider through DeerFlow’s sandbox interface. This script does the same with no model, so you can check the setup. Save it asbackend/boxd_demo.py:
/mnt/user-data/outputs on the machine is now in the thread’s output directory in DeerFlow.
What each thread gets
- Its own machine. Machines are created isolated: no private network, and no boxd credentials inside. The API key stays in DeerFlow’s Gateway, and per-call secrets travel as the command’s environment, not in the command text.
- Its files. A new machine receives the thread’s uploads, workspace, outputs, and skills before the agent gets it, at the same
/mnt/user-datapaths the agent sees. Each transfer is one archive of at most 5,000 files and 128 MiB. - Its outputs back. At the end of a turn, DeerFlow copies
/mnt/user-data/outputsback to the thread’s output directory, up to 2,000 files and 512 MiB in 120 seconds. - A warm pool. After a turn the machine waits in DeerFlow’s warm pool. Only the same thread can take it back, after a health check.
idle_timeout(600 seconds by default) deletes it after that. A later turn gets a new machine with the thread’s files restored, so anything outside/mnt/user-datais gone then. - Command deadlines. Commands run through
bash -lc. One that runs past its timeout ends inside the machine with exit code 124 and keeps its partial output. - Sleep and wake. A machine in standby or hibernation wakes on the next call. Set
auto_suspend_timeoutto put idle machines in standby sooner. - Your tools. Set up one machine with the tools your agents need, save it as a snapshot, and name it in
from_snapshot. New machines start from it.
deer-flow: sandbox and deer-flow-scope: <scope id>. Look for these labels to find machines a crashed Gateway left behind.
Read more
- The boxd sandbox provider in DeerFlow’s repo, with every option and the full lifecycle
- Sandbox configuration in DeerFlow’s docs
- Sandboxes on boxd