Skip to main content
Many tasks need a real web browser: agents that browse the web, scrapers, end-to-end tests, or bots that log in and fill in forms. Running that browser on your own machine or servers is awkward and risky. Every sandbox on Fibre’s default image has a browser of its own: Chromium, with Playwright and ChromeDriver already installed, and support for Puppeteer. There are two ways to use it, depending on where your code runs:

Run a browser script inside the sandbox

The quickest way to start is to write a Playwright script, run it inside the sandbox, and read its output. This example opens Hacker News, reads the five top stories, and takes a screenshot of the page.
1

Start a sandbox

2

Write the script

Playwright and its Chromium are already installed in the default image, so require("playwright") works without an npm install.
3

Run it and read the result

curl: the result
output
The script prints the five stories as JSON:
stories
You can use Python in the same way. Install Playwright with pip install playwright in a virtual environment, then point it at the installed browser with executable_path="/usr/local/bin/google-chrome".

Drive the browser from your code

Sometimes the agent runs in your own app, not in the sandbox. It then needs to control the browser remotely, one step at a time: look at the page, decide what to do, click. For that, ask the sandbox for its browser. You get back two links:
response
cdp_url uses the Chrome DevTools Protocol (CDP), the standard way for automation tools to control Chrome. Connect to it with Playwright from your own machine or server:
Use the browser’s existing context, as above, rather than creating a new one. The existing context is where the browser keeps its cookies and logins, and it is what survives a sleep. The DevTools address also answers the standard discovery requests, so any tool that speaks CDP can find the browser:
response
The links work for an hour. To choose a different duration, pass {"ttl_sec": …} (between 60 seconds and a day, but never past the sandbox’s lifetime, if it has one). You can ask for fresh links at any time.

Watch it live

Open live_view_url in any browser. You see the page exactly as the agent sees it, and you can click and type into it yourself. You could show it to your user while their agent books a flight for them, or open it yourself to find out why a script is stuck. The live view only shows the screen and passes on clicks and key presses. It cannot run code or reach the DevTools, so it is safe to share.

Logins that last

The browser is part of the sandbox, so when the sandbox sleeps, the browser sleeps with it, together with its open tabs, cookies, local storage and the page it was on. The next connection finds it exactly as it was. That makes “log in once, reuse for days” simple. Give each user a sandbox for the site they want automated. The user logs in once through the live view, and from then on your agent uses that logged-in session. Between uses, the sandbox sleeps: nothing for compute, and its saved state counts towards your storage.

A browser from the start

If you know you will need the browser, ask for it when you create the sandbox with "needs": ["browser"]. The browser then starts together with the sandbox, and the create answer already includes the links under browser. Such a sandbox uses the vm runtime unless you choose another one, because browsers run faster there.
response

Close it

When you no longer need the browser, close it with closeBrowser() (or DELETE /v1/sandboxes/{id}/browser). This cancels every link, closes their connections and stops the browser. The sandbox itself keeps running.

Good to know

A few details about how the browser behaves:

Clean up

Desktop

A whole desktop, not only a browser, for computer-use agents.

Public URLs

Test your own app with the browser in the same sandbox.