TOOL WIKI · RUNTIME & DEPLOYMENT
Browserbase
Provides hosted browser environments for automation workloads.
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
Set the allowed runtime, network access, credentials, and maximum duration.
inputTo 02 · BrowserbaseA browser agent that needs managed browser sessions. Isolate session identities and inspect actions that can modify external state.
processTo 03 · Worker environmentRun only the workload and dependencies required for the task.
Check permissions at each resource service and reconcile uncertain writes.
Inspect files, records, and task-level acceptance criteria.
outputTo 06 · LifecycleRetain required artifacts, release temporary compute, and expire task credentials.
Result or stopping point
A browser agent that needs managed browser sessions. Isolate session identities and inspect actions that can modify external state.
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.
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
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
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
Explore the same layer
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.