boxkite

Capability

Sandboxes

A sandbox is one isolated pod per session. Create one, use it for as long as you need, destroy it when you're done — the same four operations, in the same shape, whether you drive them from Python, JS, the CLI, or an MCP client.

Create

label is optional and never leaves the control-plane (not passed into the sandbox itself). Four more optional params control sizing: size (a CPU/memory preset — "small" by default, or "medium"/"large"), storage_gb(overrides the sandbox's volume size), lifetime_minutes (overrides how long it stays alive), and count (batch-create several sandboxes in one call, default 1). All four are optional and bounded by fair-use ceilings on your account, never a paid upgrade.

create.py
sandbox = client.create_sandbox(label="build-job", size="medium", storage_gb=20, lifetime_minutes=120)
sandboxes = client.create_sandbox(label="fanout", count=3)  # batch-create 3

Batch creation (count > 1) returns a bare list instead of a single object — every surface above handles both response shapes.

Get, list, destroy

manage.py
client.get_sandbox(sandbox["id"])
client.list_sandboxes(active_only=True)
client.destroy_sandbox(sandbox["id"])

Context manager (Python only)

The Python SDK adds a context-manager helper that creates a sandbox, hands you a session-bound client, and destroys it automatically on exit — even if an exception was raised inside the block:

quickstart.py
with client.sandbox(label="demo") as sb:
    result = sb.exec("python3 -c 'print(1 + 1)'")
    print(result["stdout"])  # "2\n"
# destroyed automatically here