Creativity · Agent Protocol
Stagehand — AI Browser Agent Framework
Stagehand's thesis: pure-Playwright scripts break when sites change; pure-LLM browser agents are unpredictable and expensive. Stagehand mixes both — use `act('click the login button')` when you want AI resilience, fall back to `page.click(selector)` when you want determinism. Typed Node/Python SDK. Fast-growing standard for production web agents.
Protocol facts
- Sponsor
- Browserbase
- Status
- stable
- Spec
- https://docs.stagehand.dev/
- Interop with
- Playwright, Browserbase, OpenAI, Anthropic
Frequently asked questions
How does Stagehand decide when to use AI?
You decide. Each step is either a Playwright API call (deterministic) or `act/extract/observe` (AI-powered). Best practice: use AI for steps likely to change (content extraction, button labels) and Playwright for stable paths (URLs, form IDs).
Stagehand vs. just using an LLM with Playwright?
Stagehand builds in the plumbing — DOM observation, element grounding, retry logic, caching — that you'd otherwise write. Its `observe()` and `extract()` primitives also have strong typed outputs, which a raw LLM doesn't.
Does Stagehand require Browserbase?
No. Stagehand runs against any Playwright-compatible browser, including local Chrome. Using Browserbase adds cloud infra (stealth, session replay), but it's optional.
Sources
- Stagehand docs — accessed 2026-04-20
- Stagehand GitHub — accessed 2026-04-20