This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @browserbasehq/browse-cli@0.2.0 ### Minor Changes - [#1816](https://github.com/browserbase/stagehand/pull/1816) [`687d54a`](687d54adda) Thanks [@shrey150](https://github.com/shrey150)! - Add `--context-id` and `--persist` flags to `browse open` for loading and persisting Browserbase Contexts across sessions - [#1793](https://github.com/browserbase/stagehand/pull/1793) [`e38c13b`](e38c13b752) Thanks [@shrey150](https://github.com/shrey150)! - Initial release of browse CLI - browser automation for AI agents ### Patch Changes - [#1806](https://github.com/browserbase/stagehand/pull/1806) [`f8c7738`](f8c773898f) Thanks [@shrey150](https://github.com/shrey150)! - Fix `browse env` showing stale mode after `browse env remote` - Updated dependencies \[[`505e8c6`](505e8c6736), [`2f43ffa`](2f43ffac11), [`63ee247`](63ee247ac6), [`7dc35f5`](7dc35f5e25), [`335cf47`](335cf4730e), [`6ba0a1d`](6ba0a1db7f), [`4ff3bb8`](4ff3bb831a), [`c27054b`](c27054bbd0), [`2abf5b9`](2abf5b90f1), [`7817fcc`](7817fcc315), [`7390508`](73905088c5), [`611f43a`](611f43ac8d), [`521a10e`](521a10e369), [`2402a3c`](2402a3c4d5)]: - @browserbasehq/stagehand@3.2.0 ## @browserbasehq/stagehand@3.2.0 ### Minor Changes - [#1779](https://github.com/browserbase/stagehand/pull/1779) [`2f43ffa`](2f43ffac11) Thanks [@shrey150](https://github.com/shrey150)! - feat: add `cdpHeaders` option to `localBrowserLaunchOptions` for passing custom HTTP headers when connecting to an existing browser via CDP URL - [#1834](https://github.com/browserbase/stagehand/pull/1834) [`63ee247`](63ee247ac6) Thanks [@tkattkat](https://github.com/tkattkat)! - Update stagehand agents search tool - [#1774](https://github.com/browserbase/stagehand/pull/1774) [`521a10e`](521a10e369) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add new page.setExtraHTTPHeaders() method ### Patch Changes - [#1759](https://github.com/browserbase/stagehand/pull/1759) [`505e8c6`](505e8c6736) Thanks [@shrey150](https://github.com/shrey150)! - Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec. - [#1814](https://github.com/browserbase/stagehand/pull/1814) [`7dc35f5`](7dc35f5e25) Thanks [@tkattkat](https://github.com/tkattkat)! - Change usage of openai provider in agent to default to store:false - [#1846](https://github.com/browserbase/stagehand/pull/1846) [`335cf47`](335cf4730e) Thanks [@aq17](https://github.com/aq17)! - Fix streaming finished event being silently dropped. The final SSE event containing the result payload (success status, message, actions, usage, and messages) was previously discarded instead of being yielded to the caller. - [#1764](https://github.com/browserbase/stagehand/pull/1764) [`6ba0a1d`](6ba0a1db7f) Thanks [@shrey150](https://github.com/shrey150)! - Expose `headers` in `GoogleVertexProviderSettings` so model configs can pass custom provider headers (for example `X-Goog-Priority`) without TypeScript errors. - [#1847](https://github.com/browserbase/stagehand/pull/1847) [`4ff3bb8`](4ff3bb831a) Thanks [@miguelg719](https://github.com/miguelg719)! - Enable FlowLogger on BROWSERBASE_FLOW_LOGS=1 - [#1752](https://github.com/browserbase/stagehand/pull/1752) [`c27054b`](c27054bbd0) Thanks [@derekmeegan](https://github.com/derekmeegan)! - fix: pause Browserbase agents while captcha solving is active and improve CUA recovery after the solve completes - [#1800](https://github.com/browserbase/stagehand/pull/1800) [`2abf5b9`](2abf5b90f1) Thanks [@shrey150](https://github.com/shrey150)! - Make projectId optional for Browserbase sessions — only BROWSERBASE_API_KEY is required - [#1766](https://github.com/browserbase/stagehand/pull/1766) [`7817fcc`](7817fcc315) Thanks [@tkattkat](https://github.com/tkattkat)! - Add configurable timeout to tools in agent - [#1749](https://github.com/browserbase/stagehand/pull/1749) [`7390508`](73905088c5) Thanks [@pirate](https://github.com/pirate)! - When connecting to a browser session that has zero open tabs, Stagehand now automatically creates an initial `about:blank` tab so the connection can continue. - [#1761](https://github.com/browserbase/stagehand/pull/1761) [`611f43a`](611f43ac8d) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - fix issue where handlePossibleNavigation was producing unnecessary error logs on clicks that trigger page close - [#1817](https://github.com/browserbase/stagehand/pull/1817) [`2402a3c`](2402a3c4d5) Thanks [@tkattkat](https://github.com/tkattkat)! - Add support for passing custom headers in clientOptions ## @browserbasehq/stagehand-evals@1.1.9 ### Patch Changes - Updated dependencies \[[`505e8c6`](505e8c6736), [`2f43ffa`](2f43ffac11), [`63ee247`](63ee247ac6), [`7dc35f5`](7dc35f5e25), [`335cf47`](335cf4730e), [`6ba0a1d`](6ba0a1db7f), [`4ff3bb8`](4ff3bb831a), [`c27054b`](c27054bbd0), [`2abf5b9`](2abf5b90f1), [`7817fcc`](7817fcc315), [`7390508`](73905088c5), [`611f43a`](611f43ac8d), [`521a10e`](521a10e369), [`2402a3c`](2402a3c4d5)]: - @browserbasehq/stagehand@3.2.0 ## @browserbasehq/stagehand-server-v3@3.6.1 ### Patch Changes - [#1759](https://github.com/browserbase/stagehand/pull/1759) [`505e8c6`](505e8c6736) Thanks [@shrey150](https://github.com/shrey150)! - Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec. - Updated dependencies \[[`505e8c6`](505e8c6736), [`2f43ffa`](2f43ffac11), [`63ee247`](63ee247ac6), [`7dc35f5`](7dc35f5e25), [`335cf47`](335cf4730e), [`6ba0a1d`](6ba0a1db7f), [`4ff3bb8`](4ff3bb831a), [`c27054b`](c27054bbd0), [`2abf5b9`](2abf5b90f1), [`7817fcc`](7817fcc315), [`7390508`](73905088c5), [`611f43a`](611f43ac8d), [`521a10e`](521a10e369), [`2402a3c`](2402a3c4d5)]: - @browserbasehq/stagehand@3.2.0 ## @browserbasehq/stagehand-server-v4@3.6.1 ### Patch Changes - Updated dependencies \[[`505e8c6`](505e8c6736), [`2f43ffa`](2f43ffac11), [`63ee247`](63ee247ac6), [`7dc35f5`](7dc35f5e25), [`335cf47`](335cf4730e), [`6ba0a1d`](6ba0a1db7f), [`4ff3bb8`](4ff3bb831a), [`c27054b`](c27054bbd0), [`2abf5b9`](2abf5b90f1), [`7817fcc`](7817fcc315), [`7390508`](73905088c5), [`611f43a`](611f43ac8d), [`521a10e`](521a10e369), [`2402a3c`](2402a3c4d5)]: - @browserbasehq/stagehand@3.2.0 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
The AI Browser Automation Framework
Read the Docs
If you're looking for the Python implementation, you can find it here
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
You can install and build Stagehand directly from a github branch using gitpkg
In your project's package.json set:
"@browserbasehq/stagehand": "https://gitpkg.now.sh/browserbase/stagehand/packages/core?<branchName>",
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.
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.