Skip to main content
Some work has no API. Think of an old admin panel, a desktop application, a website that blocks automation, or a task you want a computer-use model to carry out the way a person would, by looking at the screen and clicking. For that kind of work, a sandbox can have a complete desktop. It gives you:
  • A familiar desktop with windows and a taskbar, a browser, a terminal and VS Code.
  • A link that a person opens in their own browser to watch the desktop and take over when needed.
  • Screenshots, clicks and keystrokes that your agent sends as ordinary commands.
Like everything else in a sandbox, the desktop goes to sleep with its windows still open, and wakes up exactly as it was.

Start a desktop

Ask for a desktop with "needs": ["desktop"] when you create the sandbox:
response
The call answers once the desktop is up and ready, and the answer includes a link to it. A desktop always uses the vm runtime.

Watch it, or hand it to a person

Open desktop_url in your browser. You see the sandbox’s screen and can use it with your own mouse and keyboard, as if you were sitting in front of it. Desktop links have a few safety rules:
  • Each link works once. Whoever opens it first gets the desktop, and nobody else can reuse that link.
  • An unopened link expires after desktop_expires_in seconds (300, so five minutes).
  • You can ask for a new link at any time, for yourself or for a user who needs to step in:
response
Bring a person in when the agent needs help. When your agent reaches a CAPTCHA, a two-factor login prompt, or a decision it should not make alone, send the user a fresh link. They deal with it on the same desktop, close the tab, and the agent carries on from there.

Let an agent drive it

A computer-use agent works in a loop: it looks at the screen, decides what to do, acts, and looks again. On Fibre, each of those steps is a single command run in the sandbox. The desktop’s screen is display :1, which is why the commands below start with DISPLAY=:1.
1

Look: take a screenshot

output
2

Act: click and type

xdotool is a standard Linux tool that moves the mouse, clicks and types, exactly as a person would:
response
3

Put it in a loop with your model

Now connect the two with a model. Each time round the loop, the model looks at the latest screenshot and replies with the next action, and your code turns that action into a command. Here is a sketch of the loop, with the call to your model left for you to fill in:

What is on the desktop

The desktop comes with these applications and tools:

Sleep

A desktop goes to sleep once nobody is watching it and nothing has been done through Fibre (no exec, command or file call) for its idle timeout. Programs running on the desktop by themselves do not keep it awake. Opening a new link, or making any call, wakes it with the same windows, tabs and editor as before.

Clean up

Browser

If you only need a browser, it is lighter and faster.

Runtimes

Desktops run on the vm runtime. Find out what that means.