Sandbox is a box with a control API. You create one, then run code or processes in it, read and write its
files, open ports to the outside, and throw it away. A CPU sandbox runs in gVisor with CPU, memory and network
limits, which is what makes it safe for code an LLM wrote or a customer uploaded. A sandbox that asks for a GPU
runs on a GPU pool, and those run runc. The hardening under Network and Isolation is
there for them, but not all of it is switched on yet, so keep code you don’t trust off GPU sandboxes.
What you can do with an instance
Network
By default a sandbox can reach the internet.block_network=True cuts all outbound traffic, and
allow_list cuts it except for the CIDR ranges you list, such as ["140.82.112.0/20"]. Replies to
connections that come in through an exposed port always get through.
Some destinations are the platform’s, not yours, and allow_list can’t open them: the cloud’s metadata
service (169.254.169.254), the ports of the machine your sandbox runs on, other containers on that machine,
and private network ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10). DNS and the
levers9 API stay reachable. The platform is turning this on in stages: where it’s still in its observe phase,
such a connection goes through and is counted, so you may not see it blocked yet. If your code needs a
private service, ask the person who runs your levers9 deployment to add it to the allowed destinations.
Isolation
On GPU machines, where sandboxes run under runc instead of gVisor, the platform can apply Docker’s default seccomp profile, hide the kernel files Docker hides under/proc and /sys and make the rest of them
read-only, and stop setuid programs from gaining privileges. What a deployment turns on is chosen per pool,
so ask the person who runs yours if a tool you use stops working. A sandbox that runs Docker keeps what Docker
needs.
Docker inside
docker_enabled=True lands on a runc pool. Today that’s allowed and logged; a platform admin can set
worker.sandboxDockerRuntime: enforce, and then such a sandbox is refused when it’s created (unless a gVisor GPU
pool exists) and a Docker sandbox never lands on a runc pool.
Parameters
Beyond the common ones:keep_warm_seconds (default 600), sync_local_dir (copy the
current directory in on creation), block_network / allow_list (CIDR ranges), docker_enabled, ports
(exposed at creation), and two choices worth making every time:
workspace_token=False takes effect once the controlplane you’re on honours it; the hosted one does after its
next rollout. Until then the token is still passed.
Sandboxes appear under Containers in the dashboard while they run, with their output.
