exec shell commands, read and write files, expose ports at public URLs, checkpoint the entire machine state (disk + memory + open connections), fork copies of it, and destroy it when done. Naïve owns the compute vendor account and scopes every sandbox to your tenant — your agents never hold a vendor key (the same operator-key model as Compute with AWS and Mobile with Mobilerun).
Sandboxes are usage billed from your credits: you pay for the CPU, memory, and disk the sandbox actually uses while running, plus a small one-time creation fee per size. Sleeping and parked sandboxes are free. Running out of credits auto-destroys the sandbox, as does the max-runtime failsafe. Creating/forking a sandbox, running commands, and publishing a guest port to the public internet (
create/fork/exec/expose) are sensitive — depending on the user’s Account Kit they may require human approval (status: "pending_approval").Create a sandbox & run code
naive.sandbox.* (your default user) vs naive.forUser(id).sandbox.* (an end-user). Each tenant only ever sees the sandboxes it created through Naïve, and each tenant’s credits fund only its own sandboxes.
Sizes (ceilings, not reservations)
size sets the resource ceiling — billing always follows what the sandbox actually uses:
You can also override the memory/disk ceilings with
memoryGib / diskGib within the size’s range.
Files in, files out
Expose ports
Serve HTTP (or raw TCP) straight from the sandbox at a public URL:Checkpoint & fork
A checkpoint captures the entire machine — disk, memory, and open connections — without stopping it. Fork starts a NEW sandbox from a checkpoint (bills like create):Park, sleep & resume (free idle)
- Park checkpoints and stops the sandbox (and its meter) until an explicit
resume. - Sleep idles it — it wakes transparently on ingress traffic, the next
exec, or an optional scheduledwakeAt.
Lifecycle & status
Billing & failsafes
- Observed usage while
running— CPU, memory, and disk actually used, metered every minute from the same credit balance as every other primitive, plus a one-time creation fee per size.naive.sandbox.status()returns the current per-hour rates. - Sleeping/parked is free — the checkpoint persists, the VM does not bill.
- Auto-destroy — a sandbox is destroyed automatically when your credits run out or when it exceeds the max-runtime cap; the sandbox record keeps the reason in
error.
Sandbox vs Compute
/compute runs your own Docker images as long-lived services, jobs, and schedules. /sandbox is for scratch work: an instant disposable machine for running generated or untrusted code — no image to build, no deploy step.
Other surfaces
- CLI:
naive sandbox - SDK:
naive.sandbox - MCP:
naive_sandbox_create,naive_sandbox_exec,naive_sandbox_write_file,naive_sandbox_read_file,naive_sandbox_expose,naive_sandbox_checkpoint,naive_sandbox_fork,naive_sandbox_park,naive_sandbox_sleep,naive_sandbox_resume,naive_sandbox_destroy, … - API: Sandbox API reference
- IaC: grant it in an AccountKit with the
sandboxskill (approvesandbox.create/sandbox.fork/sandbox.execas needed)