The problem with browser automation
Traditional frameworks like Playwright and Puppeteer force you to write brittle scripts that break with every UI change. Web agents promise to solve this with AI, but leave you at the mercy of unpredictable behavior. You’re stuck between two bad options:- Too brittle: Traditional selectors break when websites change
- Too agentic: AI agents are unpredictable and impossible to debug
Enter Stagehand
Three primitives let you choose how much AI each step uses:Act
Execute actions using natural language
Extract
Pull structured data with schemas
Observe
Discover available actions on any page
- TypeScript
- Python
- Go
Why developers choose Stagehand
- Precise control: Mix AI-powered actions with deterministic code. You decide exactly how much AI to use.
- The engine runs inside the browser: Act, extract, and observe execute in an in-browser runtime instead of a Node process wrapping Playwright, and clients talk to it over a typed, bidirectional JSON-RPC protocol.
- First-class TypeScript, Python, and Go SDKs: Each client is generated from the same protocol, so every method and option matches across supported languages.
- The AI primitives live on Stagehand:
act,extract, andobserveare methods onstagehand. They run on the browser’s active page by default, or on a page you pass. Deterministic controls likegoto,click, andtypestay onpage. - Extraction is typed:
extractvalidates results against a schema you define and hands back fully typed data. - Models are flexible: Use a supported provider by name or supply your own client-side LLM callback.
- Metrics are built in: Read per-method token usage and inference timing with
metrics().
Built for modern development
Stagehand is designed for developers building production browser automations and AI agents that need reliable web access.Works everywhere
Works everywhere
Compatible with all Chromium-based browsers: Chrome, Edge, Arc, Brave, and more. Stagehand drives the browser over the Chrome DevTools Protocol, so there is no Playwright or Puppeteer dependency.
Built by Browserbase
Built by Browserbase
Created and maintained by the team behind enterprise browser infrastructure.
Get started in 60 seconds
Browserbase recommends running Stagehand on Browserbase. A hosted browser is what enables server-side caching and the Model Gateway.
Quickstart
Build your first automation in under a minute
View templates
See real-world automation examples
Join Discord
Get help from the community
Installation
Add Stagehand to your project

