Stagehand: The AI Browser Automation Framework

Control browsers with natural language and code for flexible, maintainable, reliable automation.

Stars
★ 26k
Last updated
today
License
MIT
Primary language
TypeScript

At a glance

How it runs
Library / SDKMCP server
Works with
Platform-specific
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Node.jspnpmLLM API keyBrowserbase credentialsShell / CLINetwork accessLocal filesystem
Typical use
Frontend developers needing to automate tests for dynamic web apps without writing brittle selectors.
Not a fit if
  • Developers outside TypeScript, Python, and Go, the only official SDKs
  • Teams that want zero per-use LLM costs

What does this agent do, and when should you use it?

Stagehand is a browser automation framework that combines AI with code, letting developers use natural language for actions while retaining precise control via code. Built on a CDP engine, it offers core APIs like act(), agent(), and extract() for individual actions, multi-step tasks, and structured data extraction. The framework features auto-caching and self-healing, remembering repeated actions to reduce LLM inference and recovering when websites change. Written in TypeScript and managed with pnpm, it integrates into existing Node.js projects. It requires an LLM API key and optionally Browserbase credentials.

Stagehand interacts with the browser via its CDP engine, providing act() to execute a single natural language instruction (e.g., 'click on the stagehand repo'), agent() for multi-step tasks (e.g., 'Get to the latest PR'), and extract() to pull structured data (e.g., PR author and title) with Zod schemas. It automatically caches actions to avoid LLM calls and self-heals when page changes break automation. Setup can be done via npx create-browser-app or by cloning and building with pnpm.

  1. Frontend developers needing to automate tests for dynamic web apps without writing brittle selectors.
  2. Data engineers extracting structured data from sites with frequently changing HTML.
  3. DevOps engineers monitoring web dashboards and performing routine clicks via natural language.
  4. QA engineers replacing fragile selectors with natural language to stabilize test suites.
  5. Product managers prototyping automation workflows quickly without deep coding knowledge.

How do you install or deploy this agent?

Requires Node.js and pnpm. Clone the repo: git clone https://github.com/browserbase/stagehand.git, cd in, run pnpm install and pnpm run build. Alternatively, use npx create-browser-app to scaffold a new project. You'll need an LLM API key (e.g., OpenAI) and Browserbase credentials–copy .env.example to .env and fill in values.

How do you use this agent?

After install, run pnpm run example to try the sample. In code, use stagehand.act("click on the stagehand repo") for single actions, stagehand.agent().execute("Get to the latest PR") for multi-step, and stagehand.extract(...) with a Zod schema to get data. Ensure env vars are set for LLM and Browserbase.

What are this agent's strengths and limitations?

Pros
  • Blends natural language with code, allowing flexibility on unfamiliar pages and precision when needed.
  • Auto-caching remembers repeated actions, saving tokens and reducing latency.
  • Offers clear APIs (act, agent, extract) covering a wide range of automation needs.
  • Built on CDP and Playwright, providing a stable and debuggable foundation.
Limitations
  • Requires LLM API keys, incurring per-use costs.
  • Depends on Browserbase for remote browser management, adding a third-party service.
  • As a relatively new framework, its ecosystem and docs are less mature than Selenium or Playwright.
  • Primarily TypeScript/Node.js, which may be a barrier for developers in other languages.

How does this agent compare with similar options?

Compared to traditional automation tools like Selenium or Playwright, Stagehand lets you replace some low-level code with natural language, reducing maintenance overhead.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Stagehand: The AI Browser Automation Framework This agent 47 · Major gaps Library / SDKFree + model costs ★ 26k today TypeScript —
CamoFox Browser Server 72 · Some gaps Self-hosted serviceFree ★ 424 27d ago JavaScript Claude Code
Uni-CLI 72 · Some gaps CLIFree ★ 235 8d ago TypeScript ChatGPT · Codex · Claude Code
Notte Web Automation 44 · Major gaps Library / SDKFreemium ★ 2k today Python —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
47/ 100 5-point scale 2.4 / 5
This review covers the source as of Aug 09, 2026. The project has shipped 3 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 8/29
Reliability 9/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust8 / 29 · 1.4/5

Evidence shows: CLI tests explicitly verify that raw argv values (e.g., URLs and tokens) are not sent to telemetry, demonstrating sensitive data protection; dependency overrides (pnpm overrides) show proactive mitigation of known vulnerabilities; but user confirmation mechanisms (e.g., confirmation before act) and rollback functionality are missing. Deductions: user confirmation and rollback absent, data flow transparency only partially shown (e.g., telemetry events), external effects (e.g., browser actions) not explicitly restricted.

Reliability9 / 14 · 3.2/5

Evidence shows: CI workflow includes lint, build, unit tests, e2e tests, and tests cover error handling (e.g., CLI error messages); dependency versions pinned (pnpm-lock.yaml) and overrides ensure availability. Deductions: self-consistency partially shown (e.g., CLI command naming), failure messages verified in tests but not comprehensively covered.

Adaptability10 / 18 · 2.8/5

Evidence shows: README describes multiple use cases (act, agent, extract), supports local and Browserbase environments; CLI provides various commands (cloud fetch, search, etc.). Deductions: trigger precision (e.g., act instruction parsing) not detailed, environment fit (e.g., browser versions) relies on external configuration.

Convention10 / 18 · 2.8/5

Evidence shows: README provides installation and build instructions, LICENSE is MIT, CI workflow reflects maintenance responsibility; but explicit version changelog and known limitations are missing. Deductions: naming stability (e.g., CLI commands) not explicitly guaranteed, version changelog absent.

Effectiveness7 / 13 · 2.7/5

Evidence shows: Output formats (JSON, table) and file output supported, CLI provides multiple features (fetch, search, projects, etc.), marginal value high; but cost-benefit (e.g., token consumption) not quantified. Deductions: cost-benefit lacks data support.

Verifiability3 / 8 · 1.9/5

Evidence shows: README claims (e.g., reliability) are supported by tests, but no specific evidence links provided; test files (e.g., cli-cloud-contract.test.ts) verify API contracts. Deductions: claim traceability insufficient, cross-source corroboration limited, fact-inference separation unclear.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • User confirmation mechanism missing: actions like act may execute directly, use with caution.
  • Rollback functionality not provided: no automatic recovery after failed automation.
  • Data flow transparency limited: specific use and storage of telemetry data not detailed.
  • Dependency security relies on overrides, but no vulnerability scan report provided.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 7566804ed4b9 New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. Release notes excerpt
    Patch Changes - [#2842](https://github.com/browserbase/stagehand/pull/2842) [f86e609](https://github.com/browserbase/stagehand/commit/f86e609b934d3f8ae625f5399104df2df9ade7a5) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - update the MCP SDK to v1.30 and refresh supporting dependency versions …
    View on GitHub ↗
  2. stagehand-server-v3/v3.7.6 stagehand/server-v3 v3.7.6
    Release notes excerpt
    What's Changed * Version Packages by @github-actions[bot] in https://github.com/browserbase/stagehand/pull/2778 * [V3]: rm docs pkg by @seanmcguire12 in https://github.com/browserbase/stagehand/pull/2830 * [V3]: fix xpath building logic for coordinates inside of iframes by @seanmcguire12 in https://github.com/browserbase/stagehand/pull/2836 * [V3]: bump various transitive deps by @seanmcguire12 in https://github.com/browserbase/stagehand/pull/2842 * [V3]: bump non core transitive deps by @seanmcguire12 in https://github.com/browserbase/stagehand/pull/2845 …
    View on GitHub ↗
  3. stagehand-server-v3/v3.7.5 stagehand/server-v3 v3.7.5
    Release notes excerpt
    What's Changed * Contrib/2384 by @miguelg719 in https://github.com/browserbase/stagehand/pull/2385 * chore(release): retarget release automation from main to v3 by @miguelg719 in https://github.com/browserbase/stagehand/pull/2660 * fix(v3): normalize CUA coordinates to actual viewport by @miguelg719 in https://github.com/browserbase/stagehand/pull/2767 * fix(v3): preserve provider for structured output by @miguelg719 in https://github.com/browserbase/stagehand/pull/2775 * Version Packages by @github-actions[bot] in https://github.com/browserbase/stagehand/pull/2662 …
    View on GitHub ↗

FAQ

Does Stagehand support Python?
Yes, there is a separate Python implementation available at browserbase/stagehand-python, but this repository is the TypeScript version.
What credentials do I need?
You need an LLM provider API key (e.g., OpenAI) and Browserbase credentials for browser management.
How does Stagehand handle website changes?
It uses auto-caching and self-healing: when an action fails due to page changes, it re-engages AI to re-plan steps.
Can I install Stagehand into an existing project?
Yes, use pnpm to add the package from a branch, e.g., pnpm add "github:browserbase/stagehand#<branch>&path:/packages/core".
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents