sandbox_start
This remote connection cannot read or upload files from the person's computer. A local path such as /Users/me/project is not accessible from a box. Do not start a box or run commands merely to probe that laptop path; ask for an accessible repository or an authorized transfer first. Start a box: a remote x86_64 (amd64) Linux machine with Docker, Node, Go, Python, Chromium, psql, redis-cli, mysql and a virtual display (arm64 images: exec format error). sceneUrl opens the box's first service and each web service gets its own url in services[]; anyone with one of these URLs can open it: use them exactly as returned and share them only with people who should see the box. An idle box is frozen after 20 minutes without a call, with /work kept; the next call thaws it. A frozen box unused 24 hours is archived: its disk is kept 30 days after its last use, and any call or page load restores it. sandbox_stop archives a box the same way. idleTimeoutMin sets your own limit: after that many minutes without a call the box is archived, frozen or not (at most 10080, 7 days). sandbox_status and sandbox_list give stopsAt and restorableUntil. An attached phone freezes and thaws with its box (an iPhone restarts its apps); while frozen it holds no device slot and is not billed. An unopened sandbox_review lets the box and phone freeze 5 minutes after it or your last call, even with background work; opening it or your next call wakes them. Commands started with background: true (a dev server, a long build) count as activity for up to 20 minutes after your last call; after that a box freezes anyway (they carry on when the next call thaws it). Requests through the box's URLs count as activity for up to 30 minutes after the last call; after that the box freezes, and the next page load in a browser wakes it again. Background fetches from an open tab don't wake it. With no room on any host it fails with "no box capacity right now" (HTTP 503 over REST); waitForCapacitySec waits for room instead.
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": {
"goal": "<goal>"
},
"name": "sandbox_start"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | Why this box exists and what done looks like, one or two sentences in the language requested by the person (English by default) ("Make the member center refund button post the refund to the ledger; done when a refund goes through end to end in the browser"). Shown on the box's card in their app, and returned by sandbox_status so another conversation can finish the work if this one is closed | |
| name | No | What this box is for, in the language requested by the person (English by default) ("membercenter refund flow"). Shown as the card title in their app; without it they only see the box id | |
| size | No | Units of 2 vCPU, 8 GB of memory and 40 GB of disk, fixed for the box's life; 4 is the largest. Default 1 fits web front ends and most Node, Python and Go work; 2+ for Android, Gradle, Flutter or heavy compose. 0.5 is 1 vCPU and 2 GB, for one Chromium or a small script: it uses half the credits of 1 | |
| egress | No | Where the box's outbound traffic comes from. shared (default): its host's address, shared with other boxes and changing between boxes. dedicated: the account's own fixed IP (allocated on first use and kept until DELETE /v1/egress-ip or until no box has used it for 30 days; the next one gets a new address), the same for every box that uses it, for sites that remember the address a login came from. One box at a time can use it; it adds the IPv4 price (5 credits an hour) while the box runs | |
| persist | No | Names of the account's persistent folders to attach, each at /persist/<name> (created empty the first time). Unlike the rest of the box they outlive it: they are saved when the box stops (programs with files open there are asked to exit first) and before it freezes, and restored into the next box that attaches them. One box at a time can attach a folder. Close programs writing there before relying on a save, e.g. a browser profile. Stored folders count as kept files (GET /v1/persist lists them) | |
| restore | No | Id of an archived box (status archived, restorableUntil in sandbox_status or sandbox_list): brings that same box back with /work, its id and URLs instead of starting a new one, as any call on it does. It boots from its saved disk: memory is not kept, and its background commands start again. Attached phones are not kept. Pass goal as usual; the other settings are the box's own and are ignored | |
| secrets | No | From sandbox_secrets; injected as env vars | |
| services | No | Services the repo exposes; inside the box each name already resolves to its own address, and name:port reaches your process on targetPort (default: port), no sandbox_wire needed. Ports 80 and 9095 in the box are boxd's own, so a service callers reach on :80 needs targetPort, e.g. {"name":"api.internal","port":80,"targetPort":8080}. A name can also be a private IPv4 address or range (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10), for callers that dial addresses from their own registry instead of a host name: connections from the box to that range on that port reach your service in the box. A name can also point at another of your boxes: {name, port, fromBox, fromPort} is a link, so name:port in this box reaches fromPort in box fromBox (the other box thaws if frozen). Egress counts only what a box sends on connections it opens, not to private addresses or same-region S3: for a link, what this box sends | |
| toolchains | No | java-17, java-21, android, dotnet, rust, flutter (web and Android; iOS via psbx-ios flutter), esp32 (PlatformIO, compile only), python-3.12, python-3.13 (as python, python3 and pip; the system python3 is 3.11). Always on, no toolchain needed: Node, Go, Python 3.11, PHP, PowerShell, browsers, psql, redis-cli, mysql, ImageMagick and psbx-testdb (throwaway Postgres, MySQL or S3) | |
| environment | No | Name of one of your environments (sandbox_environments). The box can then reach that environment's private databases and services at their usual hostnames, gets each service's settings as /work/.sbx/env/<service>.env and .sh, and uses its externalBaseUrl unless you pass one. A service you declare under the same host name as one of its addresses runs in the box instead: that name points at the box | |
| orientation | No | Screen used by the AI and review screenshots. Omit to use the account preference (default portrait). portrait: 390x844; landscape: 1280x800. | |
| idleTimeoutMin | No | Minutes with no tool call before the box is archived (its disk is kept 30 days and the next call restores it), frozen or not; it still freezes when idle as usual. At most 10080 (7 days); a larger value uses 10080. 0 or omitted: the default idle rules in the sandbox_start description | |
| externalBaseUrl | No | Where unchanged services live | |
| waitForCapacitySec | No | When no host has room or the hosts are switching image: keep waiting in this call up to this many seconds, retrying every 15 seconds with progress, instead of failing at once. Capped by how long your client says it can wait in one call (25 seconds unless configured, see the guide). No box exists until it starts |