
Stagehand
Not yet source-checkedThe SDK for browser agents
Machine-drafted from the vendor's site · not yet source-checkedProfile updated Link checked How we rate
In short
Stagehand is an open-source SDK for building AI browser agents using natural language. It extends Playwright with AI primitives for resilient scraping and automation.
Developers and automation engineers building resilient web scrapers, QA suites, or autonomous browser agents who want AI-driven selectors on top of Playwright.
Non-technical users wanting a no-code RPA builder, or high-volume scraping jobs where per-call LLM cost and latency outweigh the maintenance savings.
Stagehand is an open-source SDK from Browserbase for building AI browser agents that drive real webpages via natural language instead of brittle CSS or XPath selectors. It sits on top of Playwright, so you keep full access to the underlying page object when you need deterministic control, and layers four AI primitives on top: act() executes plain-English steps like 'click the sign-in button' or 'fill the email field with [email protected]', extract() pulls structured data validated against a Zod schema, observe() previews the actionable elements on a page before you commit to acting, and agent() hands off a multi-step goal to an autonomous loop that plans and executes until the task is done. The intended user is a developer or automation engineer building web scrapers, QA flows, RPA replacements, or LLM agents that need to shop, book, file forms, or gather data from sites that change frequently and would otherwise break a Playwright script every week. Stagehand is model-agnostic through the Vercel AI SDK, so you can point it at OpenAI, Anthropic, Google Gemini, or a Browserbase-hosted gateway model, and it works both locally in Node/TypeScript or Python and in the cloud on Browserbase's managed headless-browser infrastructure with stealth, proxies, session replay, and captcha handling. Common workflows include resilient data extraction from listing sites, end-to-end UI test suites that survive redesigns, competitor price monitoring, form-filling automations, and long-running research agents that navigate multi-step flows autonomously.
The most pragmatic AI-browser-agent SDK I've tried — it doesn't try to replace Playwright, it augments it, so you get natural-language resilience without giving up the deterministic escape hatch when a flow really has to work. Pair it with Browserbase for stealth and it's a serious alternative to hand-rolled scrapers.
— The AI Tool Bible editorial team
Pros
- ✅ Open-source (MIT) and built directly on Playwright, so you never lose escape-hatch access to the raw page, frame, and network APIs
- ✅ Natural-language act/extract/observe primitives eliminate most brittle selectors and dramatically reduce maintenance when target sites change
- ✅ Zod-schema extraction returns typed, validated data instead of loose JSON, which fits cleanly into typed backends
- ✅ Model-agnostic via the Vercel AI SDK — swap OpenAI, Anthropic, Gemini, or a self-hosted model without rewriting the agent
- ✅ Optional Browserbase cloud provides stealth browsers, residential proxies, session replay, and captcha handling out of the box
- ✅ TypeScript and Python SDKs with good docs, a growing example library, and an active Discord
- ✅ observe() lets you inspect proposed actions before executing, which makes debugging and human-in-the-loop review practical
Cons
- ⚠️ Every act/extract call issues an LLM request, so token costs and latency add up fast on large crawls compared with hand-written Playwright
- ⚠️ Non-deterministic by nature — the same prompt can occasionally pick a different element, so critical flows still need assertions and retries
- ⚠️ Cloud features (stealth, proxies, captcha) require a paid Browserbase plan; running purely local means you handle those problems yourself
- ⚠️ Still a young project — API surface and best practices are evolving and breaking changes appear between minor versions
- ⚠️ Requires developer skills (Node/TS or Python) — no visual builder for non-technical automators
Facts
- API available
- Yes
- Free trial
- Yes
- Open source
- Yes
- Model used
- Model-agnostic (OpenAI GPT-4o, Anthropic Claude, Google Gemini via Vercel AI SDK)
- Hacker News
- 2 stories · top 33 points · last Sep 30, 2026 · checked Oct 21, 2026
- Earliest Wayback capture
- 2025-01-24 (earliest archived capture of the site, not a launch date)
Where this tool sits
Use cases
Frequently asked
- How much does Stagehand cost?
- The SDK is free and open-source under the MIT license. It runs locally against any LLM API key. Optional Browserbase cloud runtime plans start at $0/mo for Free, $20/mo for Developer, and $99/mo for Startup.
- Which AI models does Stagehand support?
- Stagehand is model-agnostic via the Vercel AI SDK. You can use OpenAI GPT-4o, Anthropic Claude, Google Gemini, or a Browserbase-hosted gateway model. It works with any LLM API key you provide.
- Is Stagehand suitable for non-technical users?
- No. It is designed for developers and automation engineers. Non-technical users wanting a no-code RPA builder should skip it. It requires coding in Node/TypeScript or Python to implement the SDK.
- How does Stagehand handle website changes?
- It uses natural language instead of brittle CSS or XPath selectors. This makes it resilient to frequent site changes that would otherwise break standard Playwright scripts. It is ideal for sites that update often.
- Can Stagehand run in the cloud?
- Yes. It works locally or in the cloud on Browserbase's managed headless-browser infrastructure. The cloud option includes stealth, proxies, session replay, and captcha handling for more robust automation.