Templates is a standalone class, not a property on Sandbox. TypeScript exports Templates (plural), Python exports Template (singular).The Python
Template class does not have a public constructor. Use the HTTP API for template management from Python, or use Sandbox.create(template="my-stack") after building the template via HTTP.Default Template
Sandboxes use the default template when no template is specified. It includes:- Ubuntu 22.04
- Python 3 with pip, venv, setuptools
- Node.js 20 LTS with npm
- Build tools: build-essential, cmake, pkg-config
- CLI tools: git, git-lfs, curl, wget, jq, rsync, htop, tree
- Editors: nano, vim-tiny
- Database: sqlite3
- Networking: openssh-client, iproute2, net-tools, dnsutils
- Claude Agent SDK and claude-code (pre-installed for agent sessions)
API Reference
Build Template
Templates are built from Dockerfiles. The Docker build produces a filesystem image that Firecracker boots as the VM’s root disk.status: "ready" immediately. Sandbox-snapshot templates transition processing → ready.
List Templates
Get Template
Delete Template
Using with Sandbox.create
Pass the template name when creating a sandbox:TemplateInfo
| Field | TypeScript | Python | Description |
|---|---|---|---|
| Template ID | templateID | template_id | Unique identifier |
| Name | name | name | Template name |
| Tag | tag | tag | Image tag (default: "latest") |
| Status | status | status | ready, building, or error |