browserbase/stagehand
The production-ready framework for AI browser automations.
Read the Docs
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, 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 (Playwright) when you know exactly what you want to do.
-
Preview and cache actions: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.
-
Computer use models with one line of code: Stagehand lets you integrate SOTA computer use models from OpenAI and Anthropic into the browser with one line of code.
Example
Here’s how to build a sample browser automation with Stagehand:
|
|
Documentation
Visit docs.stagehand.dev to view the full documentation.
Getting Started
Start with Stagehand with one line of code, or check out our Quickstart Guide for more information:
|
|
Build and Run from Source
|
|
Stagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:
|
|
Contributing
[!NOTE]
We highly value contributions to Stagehand! For questions or support, please join our Slack community.
At a high level, we’re focused on improving reliability, speed, and cost in that order of priority. If you’re interested in contributing, we strongly recommend reaching out to Anirudh Kamath or Paul Klein in our Slack community before starting to ensure that your contribution aligns with our goals.
For more information, please see our Contributing Guide.
Acknowledgements
This project heavily relies on Playwright as a resilient backbone to automate the web. It also would not be possible without the awesome techniques and discoveries made by tarsier, gemini-zod, and fuji-web.
We’d like to thank the following people for their major contributions to Stagehand:
- Paul Klein
- Anirudh Kamath
- Sean McGuire
- Miguel Gonzalez
- Sameel Arif
- Filip Michalsky
- Jeremy Press
- Navid Pour
License
Licensed under the MIT License.
Copyright 2025 Browserbase, Inc.