computer_id. An agent’s computer appears in this list named agent {id}, with agent_id set, so you can tell it from the ones you created; it belongs to the agent, not to any one session (see An agent’s computer). A session started before agents had their own computer may still hold one it provisioned for itself, named session {id}, until it ends.
The computer object
Lifecycle state — see below.
Browser configuration, or
null if disabled. Every field has a default, so {} alone is a complete option and the browser reaches the open web. Drive it through the Browser routes.Attached persistent volume. Always
null — a volume separate from the boot disk is not provisioned today; size the root disk with disk_gb.Lifecycle
Create a computer
POST /v1/computers → 202 Accepted. Provisioning is asynchronous: the response returns immediately with status: "creating". Wait for readiness before using the computer: poll GET /v1/computers/{id} until status is running. There is no computer lifecycle event to subscribe to — the event stream is session-scoped. If provisioning fails the computer moves to failed, and calls that need a live machine return 409 with code computer_unavailable.
Creating (or resuming) a computer needs a balance of at least 10 minutes of it; otherwise the call is 402 with code insufficient_credits. The 10-minute block a new computer starts in is charged when it is created.
Browser config —
{} enables one on the open web, { "allowed_domains": ["*.example.com"] } scopes it; the full option object is above. Defaults to null, which disables the browser.Snapshot (
snp_…) to restore this computer from. The field is snapshot_id, not snapshot; an id that is not your organization’s is 404.Retrieve & list
An agent’s computer
computer, or null before any session has needed one. The machine under it can change: the files are kept, and after a change this route names the new cmp_ id. Another organization’s agent is 404 not_found. It takes the same scope as GET /v1/computers/{id}.
The agent looks after its computer: it starts it when a session needs it, pauses it after a few idle minutes, and removes it when the agent is deleted. Your files are kept across all of that. So some calls on an agent’s computer work differently:
A call that names an older machine of the agent is
409 computer_unavailable; read the agent’s computer for its current one. takeover on a computer you created is 409 too: nothing else uses it, so pause it instead.
Rename
PATCH /v1/computers/{id} → 200 OK. The name is the one field a computer has that you can change after creation; the body is strict, so any other field is 400 validation_failed. Returns the computer, and is recorded in the audit log as computer.updated.
Inspect
GET /v1/computers/{id}/inspect → 200 OK. What the computer is doing right now, from two sources: the provider’s own record of it (status, last_active_at, and home — the directory the fs/* calls are rooted in, or null when the provider does not confine them), and — only when that record says running — a single probe command run inside the machine. Inspecting never wakes a paused computer, so a paused or stopped one always answers with probe: null. A probe that cannot run or cannot be parsed is also probe: null, never an error; the numbers are a sample taken at sampled_at, not a metrics feed.
This call requires the computers:write scope. Despite the verb, it is not a plain read: the probe runs a command inside your machine, on compute you are billed for. Use GET /v1/computers/{id} for a read that does not touch the machine.
The home in the example below is illustrative. Read it from this call rather than hardcoding a path — it is what the machine’s image reports, and it can differ between computers.
Response
Execute a command
POST /v1/computers/{id}/exec → 200 OK. Runs a shell command and returns its output once it has finished. A paused computer is resumed first and stays running afterwards — pausing does not lock a computer; a creating, failed, or destroyed one returns 409 with code computer_unavailable. Every run — by this route or the streamed one below — is recorded in the computer’s command history.
Max runtime, up to
600000. Defaults to 30000. When it elapses the command and every process it started (other than one detached with setsid) is killed, exit_code is 124 and timed_out is true.stdout and stderr are each returned up to 262 144 characters; truncated is true when either was cut.
Response
Stream a command
POST /v1/computers/{id}/exec/stream → 200 OK, text/event-stream. The same run as exec, delivered as it happens: the body is a stream of Server-Sent Events whose data: lines are JSON frames — zero or more {"stdout": "…"} / {"stderr": "…"} chunks in the order the process produced them, then exactly one exit frame and the stream closes. command_id names the row the run was recorded as. Same body as exec; the same 404/409/400 refusals are returned as ordinary JSON errors before the stream opens. The SDK reads this as computers.execStream(id, command, { timeoutMs }), an async iterable of frames.
Response
Build a 3D model
POST /v1/computers/{id}/build-3d → 200 OK — scope computers:write. Runs a Python script that builds a model with build123d (cad, millimetres) or Blender (blender, metres) in this computer, checks it, renders previews and publishes the exports as files. The same program an agent’s build_3d tool runs (3D assets). The toolchain (about 1.9 GB) installs into the computer on first use, so the first call needs 3 GB free disk: create the computer with disk_gb of 10 or more. A 5 GB computer has about 2.1 GB free and is refused with 409 computer_unavailable. A paused computer is resumed first, as for exec.
cad: the script assigns result, a build123d shape. blender: the script builds the scene with bpy.Any of
step, stl, 3mf, glb, obj, blend. Default ["step", "stl"] for cad, ["glb"] for blender.{ views?: ("iso"|"front"|"top"|"side")[], size?: number } — up to 4 views (default ["iso"]), 256–1024 px (default 768). false renders nothing.Default
true. false runs the checks without publishing anything; the outputs are deleted from the computer when the call ends either way.Seconds the script and its exports may run, 10–300. Default 120. Rendering the previews has its own allowance on top (about 40–60 s per view, more for larger sizes), so previews never eat into the script’s time.
Response
false when the script raised, a cad solid failed its checks, an STL or 3MF was withheld because the mesh is not watertight, or an output was over the file size limit (then nothing is published).The published exports. For
cad, STEP, STL and 3MF are published only when valid_solid and watertight are both true. For either engine, STL and 3MF are never published from a mesh that is not watertight.valid_solid (null for blender), watertight, bbox_mm [x, y, z], volume_cm3 (null when not closed), triangles. null when the script failed before producing a shape.{ message, line } — the script’s own failure, with its line number when known. A failing script is a 200 with ok: false, not an error response.creating, failed, or destroyed computer is 409 computer_unavailable; a body outside the limits above is validation_failed.
Command history
GET /v1/computers/{id}/commands → 200 OK. Every command run on the computer through exec or exec/stream, newest first, cursor-paginated (Pagination). Each row keeps the first 65 536 characters of stdout and of stderr; truncated is true when either was cut. actor is the principal that ran it — an API key, a user, or the platform acting for a session. Commands the agent runs inside a session through its own tools are not listed here; they are in the session’s event stream.
This read requires the computers:write scope — the same scope that runs a command. It hands back what those commands printed, so it is not readable by a credential that could not have produced it.
Retention. Command output is stored for 30 days and then deleted; the rest of a computer’s history is deleted with the computer. It is stored exactly as the command produced it — nothing scans or redacts it — so a command that prints a credential stores that credential for the window. Print secrets to a file, or read them from the vault, rather than to stdout.
Response
Pause & resume
Pausing stops compute charges while retaining state. Resuming makes it usable again. On an agent’s computer both go through the agent; see An agent’s computer.Response
Snapshot
POST /v1/computers/{id}/snapshot → 201 Created. Captures the current filesystem state for fast restore. The body is empty — a snapshot has no name; its handle is the returned snapshot_id, which you pass as snapshot_id when creating a new computer. A snapshot outlives the computer it was taken from.
Response
List snapshots
GET /v1/snapshots → 200 OK. The organization’s snapshots, newest first, cursor-paginated (limit, after); each item has the shape above.
Delete a snapshot
DELETE /v1/snapshots/{id} → 200 OK with { "id": "snp_…", "object": "snapshot", "deleted": true }. Requires computers:write. Returns 409 with code state_conflict while a live computer was restored from it — destroy that computer first. A destroyed computer restored from it reads snapshot_id: null afterwards. An id that is not your organization’s, or was already deleted, is 404.
Filesystem
The disk is reached through the governedfs/* operations — there is no separate upload/download channel. Each takes an absolute path. See Filesystem for limits and encoding details.
Read a file
POST /v1/computers/{id}/fs/read → 200
text (default) or base64. Ask for base64 when the file is not valid UTF-8 — decoding binary as text substitutes U+FFFD and loses bytes silently.Response
Write a file
POST /v1/computers/{id}/fs/write → 200
List a directory
POST /v1/computers/{id}/fs/list → 200
Each entry carries the file’s own metadata: type is file, directory, symlink or other; mode is the POSIX mode bits as an integer; modified_at is null when the filesystem does not report a time. The SDK returns the typed list as computers.listDir(id, path).
Create a directory
POST /v1/computers/{id}/fs/mkdir → 200
Remove a path
POST /v1/computers/{id}/fs/remove → 200
Absolute path to remove; directories are removed recursively (
rm -rf). /, the home directory and any folder that holds it are refused with 400 validation_failed before anything runs.Response
To persist an artifact beyond the computer’s lifetime, publish it to Files (Naive Managed Agents object storage) rather than leaving it on the computer’s disk.
Destroy
DELETE /v1/computers/{id} → 200 OK. Permanently destroys the computer and its non-snapshotted disk.
Response
computer_unavailable (409). It is removed when the agent is deleted.
Ending or cancelling a session destroys nothing: its agent’s computer, and the files on it, stay for
the agent’s next session. Only a computer an older session provisioned for itself —
listed as session {id} — is tied to that session. It cannot be destroyed while the session can
still run a turn (the call is computer_unavailable (409) naming the session); it is destroyed with
the session, and one left resting at idle is reclaimed after an hour of silence.