Stagehand
Also known as: Stagehand SDK, stagehand.dev, Browserbase Stagehand
MIT licensed browser automation SDK from Browserbase for TypeScript, Python and Go. Natural language act, extract and observe steps mix with Playwright style code, on a local, attached or Browserbase browser, with the model the developer picks. v4 leaves orchestration to your code.
Stagehand is an MIT licensed browser automation SDK built by Browserbase for TypeScript, Python and Go. It gives developers two layers of control in the same script: AI primitives (act to carry out an instruction, extract to pull structured data against a schema, observe to discover the actions available on a page) that heal when a site's markup changes, and Playwright style page methods (goto, click, type, locator, screenshot) for deterministic steps. It drives a browser launched locally, any Chromium browser attached over CDP, or a Browserbase cloud browser.
Version 4 removed the built in agent() loop. Stagehand now exposes discrete tools and leaves control flow to the developer's code or agent framework, with experimental integrations that hand a Stagehand browser to CrewAI, Deep Agents, Mastra, the Vercel AI SDK, Eve, Claude Code and Codex. The developer pins a model with their own provider key or a custom LLM callback, or lets Browserbase's Model Gateway choose one. Browserbase's hosted services around it, such as cloud browsers, the managed action cache, session replay and Model Gateway, are Browserbase products, billed by Browserbase and covered on its own profile.
Vendor details
Canonical URL
https://www.stagehand.dev
Category
Browser / computer-use agent
Funding status
A product of Browserbase; open source under the MIT license
Company status
first party product
Use cases & customers
Target customers
Deployment options
Integrations
Experimental integrations with CrewAI, Deep Agents, Mastra and the Vercel AI SDK over MCP, Eve natively, and guides for Claude Code, Codex, fx and Pi. Stagehand runs on local Chromium, any CDP browser or Browserbase.
In practice
Your Playwright scripts break every time the site ships a redesign. Stagehand resolves instructions like click the submit button at runtime through AI rather than a hardcoded selector.
A fully autonomous agent is too unpredictable for production but pure code is too brittle. Stagehand lets you use natural language for unfamiliar pages and deterministic code where you already know the flow.
You want to see what the AI intends before it acts. The observe call previews candidate actions before they run, and on a Browserbase browser resolved actions are cached, turning an exploratory run into a repeatable workflow that costs fewer tokens.
Sources & related URLs
Agentic Index coverage score
7.0 / 14 capabilities · 50%
| Integrations & Tool Calling | Partial |
|---|---|
|
Experimental integrations give agents in CrewAI, Deep Agents, Mastra, the Vercel AI SDK, Eve, Claude Code and Codex a Stagehand browser. Stagehand itself has no connectors or route to outside tools. Version 4 includes no autonomous agent or general purpose MCP client, and the developer's own code calls third party tools. Sourcedocs.stagehand.dev/v4/best-practices/mcp-integrationsread 2026-09-27 |
|
| Workflow Orchestration | Partial |
|
In v4, the built in orchestrator, agent(), is gone. Stagehand now exposes discrete tools and leaves the control flow to the developer's code or agent framework. The act, extract and observe calls are single steps within that flow. Sourcedocs.stagehand.dev/v4/migrations/v3read 2026-09-27 |
|
| Knowledge Grounding & RAG | Not documented |
|
The extract() call pulls structured data from the page in view against a schema at run time. The SDK has no retrieval index over the customer's own knowledge. Sourcedocs.stagehand.dev/v4/basics/extractread 2026-09-27 |
|
| Human Oversight & Guardrails | Partial |
|
The developer decides which steps use AI and which run as deterministic code. The observe() call returns candidate actions that code can inspect before calling act(). Stagehand names no approval step for a person before an action commits. Sourcedocs.stagehand.dev/v4/basics/observeread 2026-09-27 |
|
| Security, Identity & Governance | Not documented |
|
Running locally keeps data on the customer's machine. When Stagehand runs on Browserbase, the roles, SSO and SOC 2 Type II that apply belong to Browserbase. The SDK names no access model or attestation of its own. Sourcedocs.stagehand.dev/v4/first-steps/introductionread 2026-09-27 |
|
| Observability & Auditability | Partial |
|
The SDK reports token usage and performance metrics (stagehand.metrics()) and configurable logs on a local browser. Live views, recordings and session replay come from Browserbase. Stagehand describes no trace or audit trail of the SDK's own. Sourcedocs.stagehand.dev/v4/configuration/observabilityread 2026-09-27 |
|
| Memory & State Persistence | Not documented |
|
In v4, action caching is Browserbase Cache, a server side layer that works only on a Browserbase browser. With a local browser every call runs inference, and persisted user data is browser state. Stagehand describes no memory the SDK keeps for an agent. Sourcedocs.stagehand.dev/v4/best-practices/cachingread 2026-09-27 |
|
| Deployment & Data Residency | Full |
|
The MIT licensed library runs wherever the customer runs it, against a browser launched on the customer's own machine or any Chromium browser attached over CDP, with Browserbase's cloud as one option among three. Sourcedocs.stagehand.dev/v4/configuration/browserread 2026-09-27 |
|
| Prebuilt Agents, Templates & Packs | Partial |
|
AI rules files for coding agents, use case guides (such as observe use cases) and migration guides give a developer starting points to build from. Stagehand names no catalog of prebuilt automations or agents. Director is a separate Browserbase product. Sourcedocs.stagehand.dev/v4/first-steps/ai-rulesread 2026-09-27 |
|
| Triggers & Channel Coverage | Not documented |
|
The library runs only when the customer's code calls it. For deployment, Stagehand goes behind the customer's own Vercel endpoint and cron. It has no schedule, event or inbound trigger of its own. Sourcedocs.stagehand.dev/v4/best-practices/deploymentsread 2026-09-27 |
|
| Model Flexibility & Routing | Full |
|
The SDK's model option pins a model from providers such as OpenAI and Anthropic and, with the customer's own API key, calls that provider directly. A client side LLM callback brings any model. Omitting the model routes through Browserbase's Model Gateway. Sourcedocs.stagehand.dev/v4/configuration/modelsread 2026-09-27 |
|
| APIs, SDKs & MCP Extensibility | Full |
|
Stagehand is an MIT licensed SDK for TypeScript, Python and Go, with a published reference for the Stagehand, context, page, locator and response objects. Its browser tools (run, snapshot, screenshot) can be exposed to agent frameworks over MCP. Sourcedocs.stagehand.dev/v4/reference/stagehandread 2026-09-27 |
|
| Testing, Debugging & Optimization | Partial |
|
Logs, metrics and self healing actions help developers debug runs. Version 3 covered evaluations. For v4, Stagehand names no evaluation harness or scored tests. Sourcedocs.stagehand.dev/v4/configuration/loggingread 2026-09-27 |
|
| Browser & Computer Use | Full |
|
Stagehand drives a real Chromium browser, launched locally, attached over CDP or hosted on Browserbase, through natural language act, extract and observe calls mixed with Playwright style page methods (goto, click, type, locator, screenshot) in TypeScript, Python and Go. Sourcedocs.stagehand.dev/v4/first-steps/introductionread 2026-09-27 |
|
The Agentic Index coverage score grades every vendor Full, Partial or Not documented against the same 14 buyer facing capabilities, from public evidence only. Each capability links to how all vendors in the index score on it. How this evidence is graded
Product updates
Stagehand 4.2 adds page.onToolsAdded() and page.onToolsRemoved(), which fire as a website exposes or withdraws WebMCP tools during a session. The release also exports pages as PDF in the TypeScript, Python and Go SDKs and adds timeouts for locator operations and snapshots.
Bears on: MCP / tool calling / API
View sourcePricing
Free and open source (MIT)
free library; Browserbase infrastructure and model tokens billed separately
What is public
The MIT license and full source are public; Browserbase publishes its own infrastructure prices separately.
Billing mechanics
Stagehand carries no license cost at all. Running locally, the only spend is model tokens from whichever provider the developer uses. Moving to Browserbase adds metered browser hours and proxy bandwidth, and unlocks concurrent sessions, stealth mode, session replay, CAPTCHA solving, Agent Identity and a Model Gateway that consolidates model access under one API key.
Cost watchouts
Three separate invoices are easy to miss: browser time on Browserbase, LLM tokens from your model provider, and proxy bandwidth. The framework being free does not make the workload free.
Variable cost rationale
Local use costs only model tokens, and action caching directly reduces that, but hosted use adds browser hours and proxy bandwidth metered by consumption, and an agent exploring unfamiliar pages consumes all three simultaneously.
Additional watchouts
The framework being free is not the same as the workload being cheap. Model tokens dominate cost for AI resolved actions. In v4, action caching is a Browserbase service, so on a local browser every call runs inference and repeated steps pay again to resolve the same selectors.
Overage / add-ons
On Browserbase, browser hours beyond the plan allowance are reported at $0.12 per hour and proxy bandwidth at $12 per GB beyond the first gigabyte
Sales call required
No, self serve available
Free / trial
Free under the MIT license with no usage limits
Commercial notes
Stagehand is open source used as distribution for paid infrastructure. Giving the framework away with genuine local capability builds adoption. The paid Browserbase infrastructure captures the moment a workload needs concurrency, stealth or proxy rotation, which is precisely when it becomes production.
Key ambiguities
Stagehand itself has no price. The figures that matter belong to Browserbase, which publishes its infrastructure prices separately, and they are not quoted here.
Missing data
Browserbase's current tier structure and rates, and whether Model Gateway usage carries a margin over direct provider pricing.
Related vendors
- AgentQL — A self healing query language for the web, with natural language…
- AGI, Inc. — AGI, Inc
- Airtop — Cloud browsers for AI agents that compile plain English workflows…
- Asteroid — Healthcare portal integration platform whose supervised browser and…
- Automat AI — AI agents that operate computers visually, sold as Automat Workforce…
- Autotab — General AI agent that learns a workflow from a demonstration and…
Alternatives to Stagehand
The closest documented capability profiles to Stagehand among browser and computer-use agents tracked by Agentic Index, ordered by similarity on the same 14 point evidence the rankings use. No vendor pays for placement.
- Axiom.ai10.0 / 14Adds documented Triggers & Channel Coverage
- AgentQL5.5 / 14Adds documented Triggers & Channel Coverage
- Notte9.5 / 14Adds documented Security, Identity & Governance and Triggers & Channel Coverage
- Autotab8.0 / 14Adds documented Memory & State Persistence and Triggers & Channel Coverage
- Brave Leo AI Browsing6.0 / 14Adds documented Knowledge Grounding & RAG and Memory & State Persistence
- Browserbase10.0 / 14Adds documented Security, Identity & Governance and Memory & State Persistence, among others
Similarity is computed from each vendor's Agentic Index coverage score evidence, axis by axis, not from the totals. How this evidence is graded