Sandboxes
Sandboxes run short-lived commands and agent tasks in Kubernetes pods with the runc runtime. They share the host kernel; they are not Firecracker virtual machines. Restrict credentials and network access when running code you do not trust.
Runtime and templates
Choose a template from the current catalog. Enabled templates include base, codex, and interpreter; availability depends on the region and pool capacity. interpreter includes Python and common data libraries. Check tool versions inside your sandbox. The public CLI does not provide a custom-template upload flow.
Lifecycle
Create a sandbox, run commands, then call kill. connect attaches to an existing sandbox without changing its state, so it does not resume a paused or stopped sandbox. Pause, resume, snapshot, and restore are available; see Pause, resume, and snapshots. Fork and file watching return HTTP 501. lizard sandbox ssh opens an interactive shell with your CLI credentials. SSH protocol access is not available, so SSH clients, scp, and port forwarding do not work.
create -> running -> stopped (kill / expiration)
running -> paused -> running (pause / resume)
snapshot -> new sandbox (restore)Resources and timeouts
Choose a size when you create a sandbox: Small (2 vCPU / 4 GB), Medium (4 vCPU / 8 GB, the default), or Large (8 vCPU / 16 GB). See sizes and prices. Select a region explicitly when needed; a catalog entry does not guarantee free capacity.
The SDK and CLI default to a five-minute lifetime. The raw API and dashboard default to no expiration. Set an explicit lifetime: timeoutMs: 0 at creation disables expiration; a positive value sets a deadline. setTimeout accepts 1000–2147483647 ms, not zero. Commands do not reset the deadline. This is not an idle timer.
Storage and billing
Files and running processes remain available while the sandbox runs. After it stops, only files written to an attached Persistent Volume at /workspace can be reused by a later sandbox. Without a volume, /workspace is temporary. Each volume attaches to one sandbox at a time and uses node-local storage; export files that must survive node loss.
Each size has a flat hourly price, billed by the second while the sandbox runs, idle time included. Egress is included up to 2 TB per account over a rolling 30 days. A sandbox restored from a snapshot is billed by measured usage. A paused sandbox is not billed; Persistent Volumes bill separately while you keep the data. Pause or kill a sandbox when the task ends.
import { Sandbox } from '@lizard-build/sdk';
const sandbox = await Sandbox.create('interpreter', {
projectId: 'proj_123', timeoutMs: 300_000,
});
try {
const result = await sandbox.process.exec("python -c 'print(2 ** 10)'");
console.log(result.stdout, result.stderr, result.exitCode);
} finally {
await sandbox.kill();
}Quickstart · SDK reference · Run Python · Dashboard · Persistent Volumes
Updated