WorkflowsMay 7, 2026·4 min read

Browserbase — Cloud Browser Infra for AI Agents

Browserbase runs managed cloud Chromium for AI agents. Stagehand, Playwright, Puppeteer compatible. Scales to 1000s of parallel sessions with replay.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 29/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Stage only
Trust
Trust: Community
Entrypoint
Asset
Safe staging command
npx -y tokrepo@latest install bb4d0b87-1604-44d4-9fb8-c15d63ae362e --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

Browserbase is the cloud Chromium platform behind Stagehand and most production AI browser-automation stacks. Spin up a browser via API, drive it with Playwright or Stagehand, get back screenshots, network logs, and full session replay — without managing Chrome on your own infra. Best for: agents that need persistent browser sessions, residential proxies, or 100+ parallel scraping jobs. Works with: Stagehand, Playwright, Puppeteer, Selenium, Browser Use. Setup time: 2 minutes (sign up + API key).


What you get

Feature Detail
Managed Chromium Latest Chrome on Linux, no version drift
Parallel sessions 100+ concurrent on Pro, scales further on Scale plan
Residential proxies Built-in IP rotation, US/EU/Asia regions
Session replay Full video + DOM snapshots for debugging
Stealth mode Bypass bot detection on most major sites
Persistent contexts Save cookies/localStorage across runs (logged-in scraping)

Connect from Stagehand

import { Stagehand } from "@browserbasehq/stagehand";

const stagehand = new Stagehand({
  env: "BROWSERBASE",  // not LOCAL
  apiKey: process.env.BROWSERBASE_API_KEY,
  projectId: process.env.BROWSERBASE_PROJECT_ID,
});

await stagehand.init();

// Drive with natural language
await stagehand.act("Click the login button");
await stagehand.act("Fill in email with foo@bar.com");

// Or extract structured data
const products = await stagehand.extract({
  instruction: "Get all product names and prices on this page",
  schema: z.object({
    products: z.array(z.object({
      name: z.string(),
      price: z.number(),
    })),
  }),
});

Connect from Playwright

from playwright.sync_api import sync_playwright
import os

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(
        f"wss://connect.browserbase.com?apiKey={os.environ['BROWSERBASE_API_KEY']}"
    )
    page = browser.new_page()
    page.goto("https://example.com")
    page.screenshot(path="example.png")

Pricing snapshot

  • Free tier: 1 hour of browser time / month, no credit card
  • Pro: starts $99/mo for ~150 hours
  • Scale: custom for >1000 hours/mo, residential proxies, dedicated infra

FAQ

Q: Is Browserbase free? A: Yes — there's a free tier with 1 hour of browser time per month, no credit card. Paid plans start at $99/mo for production workloads.

Q: How is this different from Stagehand? A: Stagehand is the automation library (the natural-language API that drives the browser). Browserbase is the infrastructure (the cloud Chromium that Stagehand connects to). Stagehand also runs locally, but Browserbase makes it scale.

Q: Can my AI agent stay logged in across sessions? A: Yes — Browserbase persistent contexts save cookies and localStorage. Pass the contextId on the next session and the browser resumes logged-in state. Critical for scraping authenticated dashboards.


Quick Use

  1. Sign up at browserbase.com — copy your API key + project ID
  2. npm install @browserbasehq/stagehand
  3. Set BROWSERBASE_API_KEY + BROWSERBASE_PROJECT_ID env vars and use the Stagehand snippet below

Intro

Browserbase is the cloud Chromium platform behind Stagehand and most production AI browser-automation stacks. Spin up a browser via API, drive it with Playwright or Stagehand, get back screenshots, network logs, and full session replay — without managing Chrome on your own infra. Best for: agents that need persistent browser sessions, residential proxies, or 100+ parallel scraping jobs. Works with: Stagehand, Playwright, Puppeteer, Selenium, Browser Use. Setup time: 2 minutes (sign up + API key).


What you get

Feature Detail
Managed Chromium Latest Chrome on Linux, no version drift
Parallel sessions 100+ concurrent on Pro, scales further on Scale plan
Residential proxies Built-in IP rotation, US/EU/Asia regions
Session replay Full video + DOM snapshots for debugging
Stealth mode Bypass bot detection on most major sites
Persistent contexts Save cookies/localStorage across runs (logged-in scraping)

Connect from Stagehand

import { Stagehand } from "@browserbasehq/stagehand";

const stagehand = new Stagehand({
  env: "BROWSERBASE",  // not LOCAL
  apiKey: process.env.BROWSERBASE_API_KEY,
  projectId: process.env.BROWSERBASE_PROJECT_ID,
});

await stagehand.init();

// Drive with natural language
await stagehand.act("Click the login button");
await stagehand.act("Fill in email with foo@bar.com");

// Or extract structured data
const products = await stagehand.extract({
  instruction: "Get all product names and prices on this page",
  schema: z.object({
    products: z.array(z.object({
      name: z.string(),
      price: z.number(),
    })),
  }),
});

Connect from Playwright

from playwright.sync_api import sync_playwright
import os

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(
        f"wss://connect.browserbase.com?apiKey={os.environ['BROWSERBASE_API_KEY']}"
    )
    page = browser.new_page()
    page.goto("https://example.com")
    page.screenshot(path="example.png")

Pricing snapshot

  • Free tier: 1 hour of browser time / month, no credit card
  • Pro: starts $99/mo for ~150 hours
  • Scale: custom for >1000 hours/mo, residential proxies, dedicated infra

FAQ

Q: Is Browserbase free? A: Yes — there's a free tier with 1 hour of browser time per month, no credit card. Paid plans start at $99/mo for production workloads.

Q: How is this different from Stagehand? A: Stagehand is the automation library (the natural-language API that drives the browser). Browserbase is the infrastructure (the cloud Chromium that Stagehand connects to). Stagehand also runs locally, but Browserbase makes it scale.

Q: Can my AI agent stay logged in across sessions? A: Yes — Browserbase persistent contexts save cookies and localStorage. Pass the contextId on the next session and the browser resumes logged-in state. Critical for scraping authenticated dashboards.


Source & Thanks

Built by Browserbase. Commercial product with free tier.

browserbase/sdk-node — ⭐ Active SDK

🙏

Source & Thanks

Built by Browserbase. Commercial product with free tier.

browserbase/sdk-node — ⭐ Active SDK

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets