Sandbox States
A sandbox can move through these lifecycle states:| State | Description |
|---|---|
| Pending | Sandbox is being scheduled or started. |
| Running | Sandbox is active and ready for commands or file/process operations. |
| Snapshotting | The sandbox is creating a filesystem snapshot. |
| Suspending | The sandbox is being suspended and snapshotted for later resume. |
| Suspended | The sandbox has been suspended and can be resumed. |
| Terminated | Sandbox has been stopped manually or due to a timeout. |
- CLI
- Python
- HTTP
Manage Sandboxes
Use the lifecycle API to create a sandbox, inspect it, list active sandboxes, and clean it up when the work is done.- CLI
- Python
- HTTP
Resource Configuration
Configure CPU and memory for each sandbox. Disk sizing is managed by the platform and is not a currenttl option.
- CLI
- Python
- HTTP
| Parameter | Type | Default | Description |
|---|---|---|---|
cpus | float | 1.0 | Number of CPUs to allocate |
memory_mb | int | 512 | Memory in megabytes |
Timeouts
Set a timeout to automatically terminate sandboxes that run too long:- CLI
- Python
- HTTP
timeout_secs is not set, the sandbox runs until explicitly terminated.
Lifecycle Commands
Create, suspend, resume, and terminate sandboxes from the CLI or public API:- CLI
- HTTP
- Python
Runtime Environment
Sandboxes run on Tensorlake’s managed Ubuntu 24.04 environment. Custom image selection is not currently part of the public sandbox workflow, so the--image flag is intentionally omitted from these docs.
If you need startup setup, create the sandbox and then use command execution to run those steps explicitly.
Secrets
Secrets can be injected from the Python SDK or HTTP API:- Python
- HTTP
- CLI
Sandbox Information
TheSandboxInfo object returned by client.get() contains:
| Field | Type | Description |
|---|---|---|
sandbox_id | str | Unique sandbox identifier |
namespace | str | Namespace the sandbox belongs to |
status | str | Current lifecycle state |
image | str | Container image used |
resources | ContainerResourcesInfo | CPU and memory allocation |
secret_names | list[str] | Injected secret names |
timeout_secs | int | Timeout in seconds |
entrypoint | list[str] | Custom entrypoint command |
created_at | datetime | None | Creation timestamp |
terminated_at | datetime | None | Termination timestamp |
Learn More
Snapshots
Save and restore sandbox filesystem and memory state.
Networking
Control internet access and blocked destinations.