Create Sandbox
create_sandboxCreates an isolated container sandbox from a specified image and returns a sandbox ID for running commands, managing files, or coding tasks; set timeout and resources to control expiry.
Instructions
Create an isolated sandbox environment with a specified container image. Returns a sandbox_id for use with other sandbox tools. The sandbox auto-expires after the timeout (default 1 hour). Extend it with sandbox_renew. For coding tasks (e.g. git clone, npm install, dev server), use a longer timeout like 21600 (6h) or 86400 (24h) and higher resources (cpu: "2", memory: "4Gi").
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image": "<image>"
},
"name": "create_sandbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables to inject into the sandbox | |
| image | Yes | Container image URI, e.g. "node:22-bookworm", "python:3.12-bookworm" | |
| resource | No | Resource limits for the sandbox | |
| timeout_seconds | No | Sandbox timeout in seconds (default: 3600). | |
| resource_requests | No | Resource requests, reserved against node capacity. Defaults to the same values as `resource` (limits). Set them lower for a sandbox that idles between bursts, so it stops holding its full limit. Ignored by older sandbox runtimes, in which case requests stay equal to limits. |