Skip to main content
Operating System

Browser

Let agents read and search the web from an agentOS VM using Browserbase's cloud browser through the browse CLI — no local browser or sandbox required.

Agents can read and search the web with the Browserbase browse CLI. The page loads in a real browser in Browserbase’s cloud and comes back as clean content — the VM never runs a browser.

Setup

  1. Create a Browserbase account

    Sign up and grab your API key and project id from the dashboard:

    export BROWSERBASE_API_KEY=bb_...
    export BROWSERBASE_PROJECT_ID=...
    
  2. Install

    npm install @rivet-dev/agentos @agentos-software/pi @agentos-software/browserbase
    
  3. Add browse to the VM

    import browserbase from "@agentos-software/browserbase";
    import pi from "@agentos-software/pi";
    import { agentOS, setup } from "@rivet-dev/agentos";
    
    // `browse` is exposed inside the VM as a command on `$PATH`.
    const vm = agentOS({
    	software: [pi, browserbase],
    });
    
    export const registry = setup({ use: { vm } });
    registry.start();
    
  4. Use it

Command reference

browse cloud fetch https://example.com   # retrieve a page as markdown
browse cloud search "web scraping tools" # search the web
browse cloud sessions list               # list cloud browser sessions
browse cloud projects list               # list Browserbase projects

The interactive driver mode (browse open, browse click, …) is not supported inside the VM yet (#1631). For interactive automation, run browse inside a sandbox via Sandbox Mounting.