Skip to main content
A Sandbox Pool is a sandbox template — image, resources, entrypoint, timeout, network policy — plus a set of pre-booted warm containers. Creating a sandbox from a pool claims a warm container instead of cold-booting one, so the sandbox is ready almost instantly. How it works:
  • The pool keeps warm_containers idle containers booted and waiting.
  • Creating a sandbox from the pool claims a warm container if one is available; otherwise a new container cold-starts on demand.
  • After a claim, the pool boots a replacement to restore the warm buffer.
  • max_containers caps the pool’s total (warm + claimed) containers. At the cap, new sandboxes stay pending until a slot frees up.
Sandboxes claimed from a pool inherit the pool’s image, resources, entrypoint, timeout, and network policy — you cannot override them per sandbox.

Creating a Pool

Pool configuration

The HTTP API additionally accepts exposed_ports, network (egress policy), and allow_unauthenticated_access, with the same semantics as sandbox creation. Root disk size is server-managed for pool containers; ephemeral_disk_mb is accepted but ignored.

Creating a Sandbox from a Pool

Pass pool_id to Sandbox.create(). This claims a warm container when one is available.
When claiming from a pool, the sandbox name and file_systems parameters are ignored — the container is already booted from the pool’s template.

Managing Pools

Get a Pool

get_pool returns the pool configuration plus its current containers. Containers with no sandbox_id are warm and unclaimed.

List Pools

Update a Pool

update_pool replaces the pool configuration. image is required on update. The warm buffer reconciles to the new settings; already-claimed sandboxes are unaffected.

Delete a Pool

Deleting a pool tears down its warm containers. If sandboxes claimed from the pool are still active, the delete fails with PoolInUseError (HTTP 409) — terminate the sandboxes first, or pass force=true over HTTP to terminate them along with the pool.

Async

AsyncSandboxClient exposes the same pool methods (create_pool, get_pool, list_pools, update_pool, delete_pool, claim) as coroutines, and AsyncSandbox.create(pool_id=...) claims from a pool. See Async.

Lifecycle

Create, suspend, resume, and terminate sandboxes.

Sandbox Images

Build the custom images your pools boot from.

Snapshots

Capture and restore sandbox state. Snapshot restores cold-boot and don’t claim warm containers.

Networking

Egress policies you can set on a pool’s template.