Discover / AI Agents
Stagehand
by browserbaseTypeScript
AI powered browser automation framework for building reliable web agents on top of Playwright.
Maturity: stable because 2y old, stagehand-server-v3/v3.7.4 released 13d ago. Derived from release and commit history, not a rating.
- Stars
- 24k
- Forks
- 1.6k
- Downloads / mo
- —
- Last commit
- 2026-08-03
- License
- MIT
- Open issues
- 323
Market and trust evidence
Edition not yet matchedNo exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.
Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.
In practice
Written by AI from this repository’s README · high confidenceSelector based automation breaks whenever a page changes, while fully autonomous agents are unpredictable in production.
Use it when
Use it when you want AI to handle unfamiliar pages but keep deterministic code for the steps you already know.
Not the right pick when
It works best with an LLM provider key and Browserbase credentials, so it is not free of external dependencies.
Capabilities
- act() for individual natural language actions
- agent() for multi step tasks
- extract() for structured data with a schema
- CDP engine for low level browser control
- caching and self healing of repeatable actions
- preview of AI actions before running them
Requirements
- API key for an LLM provider
- Browserbase credentials
Cost: Open source with a paid cloud option
Video walkthroughs
Stagehand - Browser Automation with Natural Language and AI - Install and Test
Introducing Stagehand V3: The Best Automation Framework
Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.
What the repository ships
Detected from the actual files in the repository root.
Latest release stagehand-server-v3/v3.7.4
Published 2026-07-21
What's Changed
- feat(evals): group trajectories by run and cross-link Braintrust experiments by @miguelg719 in https://github.com/browserbase/stagehand/pull/2177
- chore(docs): Add docs ownership and review rules by @Kylejeong2 in https://github.com/browserbase/stagehand/pull/2226
- feat(core): support OpenAI Chat Completions via openaiEndpointFormat by @miguelg719 in https://github.com/browserbase/stagehand/pull/2347
- feat(server-v3): expose OpenAI endpoint format by @miguelg719 in https://github.com/browserbase/stagehand/pull/2374
Full Changelog: https://github.com/browserbase/stagehand/compare/stagehand-server-v3/v3.7.3...stagehand-server-v3/v3.7.4
Tags
README
<div id="toc" align="center" style="margin-bottom: 0;">
<ul style="list-style: none; margin: 0; padding: 0;">
<a href="https://stagehand.dev">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="media/dark_logo.png" />
<img alt="Stagehand" src="media/light_logo.png" width="200" style="margin-right: 30px;" />
</picture>
</a>
</ul>
</div>
<p align="center">
<strong>The AI Browser Automation Framework</strong><br>
<a href="https://docs.stagehand.dev">Read the Docs</a>
</p>
<p align="center">
<a href="https://github.com/browserbase/stagehand/tree/main?tab=MIT-1-ov-file#MIT-1-ov-file">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="media/dark_license.svg" />
<img alt="MIT License" src="media/light_license.svg" />
</picture>
</a>
<a href="https://stagehand.dev/discord">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="media/dark_discord.svg" />
<img alt="Discord Community" src="media/light_discord.svg" />
</picture>
</a>
</p>
<p align="center">
<a href="https://trendshift.io/repositories/12122" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12122" alt="browserbase%2Fstagehand | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</p>
<p align="center">
<a href="https://deepwiki.com/browserbase/stagehand">
<img alt="Ask DeepWiki" src="https://deepwiki.com/badge.svg" />
</a>
</p>
<p align="center">
If you're looking for the Python implementation, you can find it
<a href="https://github.com/browserbase/stagehand-python"> here</a>
</p>
What is Stagehand?
Stagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable.
Why Stagehand?
Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language (and bridging the gap between the two) Stagehand is the natural choice for browser automations in production.
- Choose when to write code vs. natural language: use AI when you want to navigate unfamiliar pages, and use code when you know exactly what you want to do.
- Go from AI-driven to repeatable workflows: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.
- Write once, run forever: Stagehand's auto-caching combined with self-healing remembers previous actions, runs without LLM inference, and knows when to involve AI whenever the website changes and your automation breaks.
Getting Started
Start with Stagehand with one line of code, or check out our Quickstart Guide for more information:
npx create-browser-app
Example
Here's how to build a sample browser automation with Stagehand:
// Stagehand's CDP engine provides an optimized, low level interface to the browser built for automation
const page = stagehand.context.pages()[0];
await page.goto("https://github.com/browserbase");
// Use act() to execute individual actions
await stagehand.act("click on the stagehand repo");
// Use agent() for multi-step tasks
const agent = stagehand.agent();
await agent.execute("Get to the latest PR");
// Use extract() to get structured data from the page
const { author, title } = await stagehand.extract(
"extract the author and title of the PR",
z.object({
author: z.string().describe("The username of the PR author"),
title: z.string().describe("The title of the PR"),
}),
);
Documentation
Visit docs.stagehand.dev to view the full documentation.
Build and Run from Source
git clone https://github.com/browserbase/stagehand.git
cd stagehand
pnpm install
pnpm run build
pnpm run example # run the blank script at ./examples/example.ts
Stagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:
cp .env.example .env
nano .env # Edit the .env file to add API keys
Installing from a branch
To install Stagehand directly from a GitHub branch, install the core package subdirectory:
pnpm add "github:browserbase/stagehand#<branchName>&path:/packages/core"
Or set it in your project's package.json:
"@browserbasehq/stagehand": "github:browserbase/stagehand#<branchName>&path:/packages/core"
Contributing
[!NOTE]
We highly value contributions to Stagehand! For questions or support, please join our Discord community.
At a high level, we're focused on improving reliability, extensibility, speed, and cost in that order of priority. If you're interested in contributing, bug fixes and small improvements are the best way to get started. For more involved features, we strongly recommend reaching out to Miguel Gonzalez or Paul Klein in our Discord community before starting to ensure that your contribution aligns with our goals.
<!-- For more information, please see our Contributing Guide. -->
Acknowledgements
We'd like to thank the following people for their major contributions to Stagehand:
- Paul Klein
- Sean McGuire
- Miguel Gonzalez
- Sameel Arif
- Thomas Katwan
- Filip Michalsky
- Anirudh Kamath
- Jeremy Press
- Navid Pour
License
Licensed under the MIT License.
Copyright 2025 Browserbase, Inc.