Skip to main content
A sandbox can run two extra things, each off by default:
  • Browser: Chrome inside the VM, which you drive from outside over the Chrome DevTools Protocol (CDP). Works with Playwright, Puppeteer and browser-use.
  • Desktop: a 1280x800 Linux desktop (Xfce). You take screenshots, send mouse and keyboard actions, and embed a live view in a page.
A sandbox with neither switched on runs no extra processes. On Free, asking for the desktop answers HTTP 402 plan_required: “the free plan does not include the desktop; upgrade in Billing”.

Switch them on

At create, or on a fork, pass browser and desktop. Left out, a new sandbox uses the workspace default (console, Settings) and a fork keeps its parent’s values.
On a running sandbox, switch either one with PATCH /v1/sandboxes/{id}/features. It returns the sandbox.
If a create or fork asks for a feature and the host fails to start it, the sandbox is still created and the response carries a feature_error message. On a create the feature stays off; on a fork it keeps the parent’s value. The SDK exposes the message as sbx.featureError. Switching off stops the processes. Chrome’s profile stays on disk, so cookies and logins survive an off and on. Stop, start, restore and fork switch the features back on as recorded.

Connect to Chrome

GET /v1/sandboxes/{id}/browser returns a browser-level CDP WebSocket URL:
The ticket in the URL opens a connection for 5 minutes. A connection that is open stays open. Ask again for a new URL each time you connect. transport is direct (straight to the host) or relay (through api.zode.dev, when the host has no public address). Only the WebSocket is exposed; the /json HTTP endpoints are not.
From the CLI, zode browser web prints the URL and zode browser web --json prints the whole answer. Inside the sandbox, the same Chrome listens at http://127.0.0.1:9222, so an agent running in the VM can attach with npx @playwright/mcp --cdp-endpoint http://127.0.0.1:9222 or Browser(cdp_url="http://127.0.0.1:9222").

Use the desktop

Screenshots and actions use screen pixels from the top left. GET /v1/sandboxes/{id}/desktop returns the screen size, {"width": 1280, "height": 800}.
POST .../desktop/actions takes one action per request (at most 64 KB) and answers 204. The actions are move, click, type, key and scroll; scroll dx and dy are notches, positive is right or down. A screenshot taken in the first second or two after switching the desktop on can be black while the session paints.

Live view

POST /v1/sandboxes/{id}/desktop/session returns a page URL to embed. Its ticket opens the page for 1 hour; the open page keeps its own connection. The view is watch-only unless you send {"control": true}, which lets the viewer’s mouse, keyboard, clipboard and file transfer through.
The stream decodes in the browser with WebCodecs, so the embedding page must be served over HTTPS. zode desktop web opens the same view in the console. With both features on, Chrome runs on the desktop’s screen, so you can watch an agent’s browser. Switching the desktop on or off restarts a running Chrome to move it: open CDP connections drop and you reconnect.

Resource use

Both run inside the sandbox’s own CPU and memory. Measured at 1280x800:
  • Chrome: about 230 MB of RAM.
  • Desktop (X server, Xfce, helper): about 400 MB of RAM.
  • The video encoder runs only while someone watches the live view: about half of one vCPU at 60 fps on a mostly still screen. Screenshots do not use it.
On a small sandbox (4 GB), plan for both together to take roughly 650 MB before your own workload.

Errors

See the CLI reference and the SDK reference.