English
Get started

Agent Sandboxes A desktop with Chrome

A desktop with Chrome for computer-use agents

A model that uses a computer needs a screen, a pointer and a browser. Every sandbox has them: a 1280×800 desktop with Google Chrome, which starts at the first call that needs it and has no price of its own.

What is on the screen

The desktop is part of our base template: an X server (Xvfb) at 1280×800, the openbox window manager, a tint2 panel, Google Chrome stable, an xterm, and Noto fonts with CJK and emoji. Nothing of it runs until you ask: the first control_desktop call, or the first desktop link, starts it, which takes some seconds. Until then it takes no memory.

Chrome is set up for an agent: no first-run pages, no default-browser or search-engine questions, no sign-in, sync, password manager, autofill, translation or metrics, and none of the built-in extensions that keep pages running in the background. It draws without a GPU. Our base is rebuilt every month, and at once for a security fix to Chrome; a sandbox keeps the version it started with.

Computer use in one call: actions, then a screenshot

control_desktop takes a list of actions and does them in order: click at a point (left, right or middle button, a double-click, with keys held such as shift), move the pointer, drag along a path, scroll, type text, press keys together (Return, ctrl+l, ctrl+shift+t), and wait a number of milliseconds. Then it answers with one PNG of the screen as the actions left it, and where the pointer is. With no actions, it is just the screenshot.

It stops at the first action that fails and says how many were done, with a reason to branch on: a point off the screen, or a key name it does not know. Coordinates are the screen’s pixels from the top left, so a model reads them off the last screenshot, and each step of the model is one round trip: the clicks and the picture they lead to come back together.

from pethost.sandboxes import Click, DesktopAction, Sandboxes

sandboxes = Sandboxes()  # reads PETHOST_TOKEN
box = sandboxes.create_sandbox()
answer = sandboxes.control_desktop(box.sandbox_id, actions=[
    DesktopAction(press_keys="ctrl+l"),
    DesktopAction(type_text="example.com"),
    DesktopAction(press_keys="Return"),
    DesktopAction(wait_ms=2000),
])
shot = answer.screenshot
open("screen.png", "wb").write(shot.image)
print(shot.width, shot.height)  # 1280 800

click = DesktopAction(click=Click(x=640, y=400))  # a point read off the screenshot
answer = sandboxes.control_desktop(box.sandbox_id, actions=[click])
pethost sandbox new --name browser --size default
pethost sandbox open browser --desktop              # live, in your browser
pethost sandbox open browser --desktop --view-only  # to watch only

Watch it, or take over

A desktop link opens the screen live in a browser. You can click and type in it, so a person can step in where the agent needs one, such as a sign-in, and hand the screen back; or make it view-only and show it in your own product. A link lasts an hour by default and a day at most, and while it is open the sandbox stays awake. Each sandbox’s page in the web console has a Desktop tab with the same screen.

The same sandbox runs commands, edits files and serves ports, so an agent can start an app with run_command and try it in Chrome at localhost, all in one VM.

Limits and prices

One screen, 1280×800, in every sandbox. A control_desktop call counts as 16 of the 64 calls a sandbox serves at once, and its screenshot may be up to 17 MiB. Chrome and the desktop run within the sandbox’s size, billed by the second: $0.018 an hour for SMALL (2 vCPU, 4 GiB), $0.036 for DEFAULT (4 vCPU, 8 GiB). Idle for 5 minutes, with nobody watching, a sandbox pauses at 30% of that price with Chrome in memory: its tabs, cookies and the page it was on are there when it wakes.

How it compares

E2B and Daytona offer desktops too, on sandboxes that cost $0.1656 an hour at 2 vCPU and 4 GiB on 21 November 2026; Pethost’s SMALL is $0.018. boat.dev streams a desktop at prices close to ours, but does not keep a browser’s memory while it waits: it has no pause.

Read the docs

Questions

Which browser does the computer use sandbox have?

Google Chrome, the stable channel, as it was in the base the sandbox started from.

How big is the screen?

1280×800 pixels, the same in every sandbox.

Does the desktop cost extra?

No. It runs within the sandbox’s size, and takes no memory until something starts it.

Can a person take over?

Yes: a desktop link is interactive unless you make it view-only, and the web console’s Desktop tab shows the screen too.

Can the agent use a terminal as well?

Yes. The same sandbox runs commands and file edits, and Claude Code, Codex and OpenCode are installed in it.

Related

Give your agent a computer in 0.15 s

Start the free trial