Create sandbox
create_sandboxCreate a new isolated Linux sandbox (microVM) and make it the current one. Returns its ID. With a name, an existing sandbox of that name is reused (woken up if asleep) – its files survive between chats. By default the sandbox falls asleep after its lifetime or 10 minutes of inactivity: files are kept, running programs stop; the next command wakes it (a few seconds).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_sandbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | Optional IP version: ipv4 (default), dual (IPv4 and its own public IPv6) or ipv6 (internet over IPv6 only; DNS still works). Refused if no server with IPv6 is free – never downgraded. | |
| name | No | Optional name (lowercase letters, digits, . _ -), e.g. 'my-project'. If you already have a sandbox with this name, it is reused instead of creating a new one. | |
| allow | No | Optional: allow only these destinations (domains or IP ranges), e.g. ["pypi.org", "files.pythonhosted.org"]. | |
| internet | No | Internet access (default true). false = no network, e.g. for sensitive data or untrusted code. | |
| template | No | Template (default 'base' = Debian with Python 3.12). | |
| keep_days | No | With on_timeout 'pause': keep the sandbox this many days after it falls asleep before it is deleted (default: your plan's retention, e.g. 7 days; the plan sets the maximum). Disk of a sleeping sandbox is billed. | |
| placement | No | Optional node choice: auto (default), fast or spread. | |
| timeout_s | No | Lifetime in seconds (default 1800). When it expires, the sandbox falls asleep (files kept) – or is destroyed with on_timeout 'kill'. | |
| on_timeout | No | What happens after the lifetime or inactivity: pause (default) = fall asleep, files are kept for several days; kill = destroy the sandbox and its data. | |
| optimize_for | No | Optional: pick the server inside the compute class by price, balanced or performance. Never changes the class or its price. | |
| compute_class | No | Optional performance class: economy, balanced, performance or memory. Without it your account's default class is used. Never downgraded; refused if no server of the class is free. | |
| from_snapshot | No | Optional snapshot ID (snap_…): the new sandbox starts with a copy of that snapshot's disk (template and default size come from the snapshot; environment variables do not – pass what it needs). | |
| idle_timeout_s | No | With on_timeout 'pause': fall asleep after this many seconds without any command (default 600). | |
| dependency_cache | No | Use the node's verified package cache for pip/npm/Go (default true when enabled). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | IP version: ipv4, dual or ipv6. | |
| ipv6 | No | Public IPv6 address of the sandbox (empty without IPv6). | |
| name | No | Name of the sandbox (empty if it has none). | |
| vcpu | No | Number of vCPUs. | |
| state | Yes | State: running. | |
| woken | Yes | The reused sandbox was asleep and has been woken up (programs from before are not running). | |
| mem_mb | No | Memory in MB. | |
| reused | Yes | An existing sandbox with this name was reused instead of creating a new one. | |
| network | No | Network mode: full, allowlist or none. | |
| template | Yes | Template the sandbox was created from. | |
| expires_at | Yes | When the sandbox expires or falls asleep (RFC 3339, UTC). | |
| on_timeout | No | What happens after the lifetime or inactivity: pause or kill. | |
| sandbox_id | Yes | Sandbox ID. | |
| idle_timeout_s | No | Seconds without commands before it falls asleep (0 = default or not used). |