TOOL WIKI · RUNTIME & DEPLOYMENT

Browserbase

Provides hosted browser environments for automation workloads.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Verify a managed browser session before connecting an agent

A developer needs a concrete execution environment for a background task, browser operation or service, with a visible terminal result.

Input
A temporary managed session and a read-only visit to the public Example Domain page.
Expected output
The page heading followed by a session-release request.
  • Success check: The hosted browser reads the public Example Domain heading and releases the session.
  • Try a failure: Navigation failures must still release the session rather than leak browser runtime.

Example scope: Actual browser infrastructure connectivity/cleanup check; it does not implement a model planner or a business workflow.

Official reference · Browserbase

WHAT IT ISBrowser infrastructure
WHERE IT FITSRuntime & deployment
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
inputprocessresultcheckoutputTask requestGoal + resource budgetBrowserbaseBrowser infrastructureWorker environmentScoped executionExternal operationsAuthorized servicesArtifacts + outcomeValidate the resultLifecyclePersist or clean up
  1. Set the allowed runtime, network access, credentials, and maximum duration.

  2. A browser agent that needs managed browser sessions. Isolate session identities and inspect actions that can modify external state.

  3. Run only the workload and dependencies required for the task.

  4. Check permissions at each resource service and reconcile uncertain writes.

  5. Inspect files, records, and task-level acceptance criteria.

  6. Retain required artifacts, release temporary compute, and expire task credentials.

    Result or stopping point
Browserbase

A browser agent that needs managed browser sessions. Isolate session identities and inspect actions that can modify external state.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • A browser agent that needs managed browser sessions.

A design decision to make

  • Isolate session identities and inspect actions that can modify external state.

Prerequisites and setup

  • A Browserbase account/project with browser runtime available. This creates a temporary managed browser session.
Shell
python3 -m venv .venv
source .venv/bin/activate
pip install requests playwright
export BROWSERBASE_API_KEY="YOUR_KEY"
export BROWSERBASE_PROJECT_ID="YOUR_PROJECT_ID"

Try a small integration

browser.py

Python · browser.py
import os
import requests
from playwright.sync_api import sync_playwright

headers = {"x-bb-api-key":os.environ["BROWSERBASE_API_KEY"]}
response = requests.post("https://api.browserbase.com/v1/sessions",headers=headers,timeout=20,
    json={"projectId":os.environ["BROWSERBASE_PROJECT_ID"]})
response.raise_for_status()
session = response.json()
try:
    with sync_playwright() as p:
        browser = p.chromium.connect_over_cdp(session["connectUrl"])
        page = browser.contexts[0].new_page()
        page.goto("https://example.com",wait_until="domcontentloaded")
        print(page.get_by_role("heading").first.inner_text())
        browser.close()
finally:
    release = requests.post("https://api.browserbase.com/v1/sessions/"+session["id"],headers=headers,timeout=20,
        json={"projectId":os.environ["BROWSERBASE_PROJECT_ID"],"status":"REQUEST_RELEASE"})
    release.raise_for_status()

Run and check the result

Shell
python browser.py
  • The hosted browser reads the public Example Domain heading and releases the session.
  • No login, purchase or account write is performed. The remote browser and its artifacts remain part of your project’s data scope.

Common failures

  • A worker accepting a job does not establish completion. Inspect the task result, failure and retry history.
  • Do not expose a development control plane or unauthenticated execution endpoint publicly.

Production decisions

  • Use bounded CPU/memory/time, restricted filesystem mounts and network access, short-lived secrets and per-user isolation.
  • Preserve run/operation identifiers, cancellation and terminal states. Retryable remote writes need provider idempotency or reconciliation.
  • Protect CDP/live-session URLs as credentials. Keep browser contexts isolated and configure artifact retention and downloads.

Keep exploring

An agent that can pause and resumeA browser or coding agent in a sandbox

Explore the same layer

TemporalInngestTrigger.devE2B

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.