Stagehand can remote-control any Chrome session that exposes a CDP endpoint. Hyperbrowser supplies the always-on, privacy-hardened sessions—complete with stealth, proxies, ad blocking, and observability—so you can connect Stagehand to a reliable browser in seconds without standing up Chrome yourself.Documentation Index
Fetch the complete documentation index at: https://hyperbrowser.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Why Hyperbrowser for your Stagehand project?
- Consistent environments – launch Chrome with stealth, custom profiles, and residential/static proxies through a single API call.
- Enterprise controls – restrict egress with managed proxies, enable audit logs via recordings/download inspection, and reuse sessions for multi-step flows.
- Faster swaps – migrate existing Browserbase + Stagehand projects by replacing the session creation call; the Stagehand client still points to the CDP URL it receives.
- Live debugging – every session automatically exposes
liveUrl, letting you watch Stagehand steps in real time.
Prerequisites
HYPERBROWSER_API_KEYloaded via.envor your secret manager.- Access to Stagehand via
@browserbasehq/stagehand(or clone from docs.stagehand.dev).
Installation
Quickstart (TypeScript)
This example mirrors the reference gist and shows Stagehand driving a Hyperbrowser session. It enables stealth, ad blocking, and accepts cookies out of the box, then attaches Stagehand to the returned CDP endpoint. To see all the available session parameters, check out the Session Parameters page.Switch from Browserbase
| Browserbase setup | Hyperbrowser replacement |
|---|---|
const session = await browserbase.sessions.create({...}); | const session = await hyperbrowser.sessions.create({...}); |
session.connectUrl | session.wsEndpoint |
liveViewLinks.debuggerFullscreenUrl | session.liveUrl |
BROWSERBASE_API_KEY | HYPERBROWSER_API_KEY |
- Swap the SDK import to
@hyperbrowser/sdk. - Rename environment variables and CI secrets to
HYPERBROWSER_API_KEY. - Map Browserbase session flags to Hyperbrowser equivalents (stealth, proxies, uploads, downloads, custom extensions).
- Update dashboards/links to use
session.liveUrl. - Stop sessions explicitly with
client.sessions.stop(session.id)to free capacity when Stagehand finishes.
Troubleshooting & resources
- Hyperbrowser sessions guide
- Stagehand Docs
- Need Browserbase parity (extensions, uploads, downloads)? Reuse the same API shape via
sessions.createwith the Hyperbrowser parameters documented under Session Parameters.