Major Changes
-
#591
e234a0fThanks @miguelg719! - Announcing Stagehand 2.0! 🎉We're thrilled to announce the release of Stagehand 2.0, bringing significant improvements to make browser automation more powerful, faster, and easier to use than ever before.
🚀 New Features
- Introducing
stagehand.agent: A powerful new way to integrate SOTA Computer use models or Browserbase's Open Operator into Stagehand with one line of code! Perfect for multi-step workflows and complex interactions. Learn more - Lightning-fast
actandextract: Major performance improvements to make your automations run significantly faster. - Enhanced Logging: Better visibility into what's happening during automation with improved logging and debugging capabilities.
- Comprehensive Documentation: A completely revamped documentation site with better examples, guides, and best practices.
- Improved Error Handling: More descriptive errors and better error recovery to help you debug issues faster.
🛠️ Developer Experience
- Better TypeScript Support: Enhanced type definitions and better IDE integration
- Better Error Messages: Clearer, more actionable error messages to help you debug faster
- Improved Caching: More reliable action caching for better performance
We're excited to see what you build with Stagehand 2.0! For questions or support, join our Slack community.
For more details, check out our documentation.
- Introducing
Minor Changes
-
#588
ba9efc5Thanks @sameelarif! - Added support for offloading agent tasks to the API. -
#600
11e015dThanks @sameelarif! - Added astagehand.historyarray which stores an array ofact,extract,observe, andgotocalls made. Since this history array is stored on theStagehandPagelevel, it will capture methods even if indirectly called by an agent. -
#601
1d22604Thanks @seanmcguire12! - add custom error classes -
#599
75d8fb3Thanks @miguelg719! - cleaner logging with pino -
#609
c92295dThanks @kamath! - Removed deprecated fields and methods from Stagehand constructor and added cdpUrl to localBrowserLaunchOptions for custom CDP URLs support. -
#571
73d6736Thanks @miguelg719! - You can now use Computer Using Agents (CUA) natively in Stagehand for both Anthropic and OpenAI models! This unlocks a brand new frontier of applications for Stagehand users 🤘 -
#619
7b0b996Thanks @sameelarif! - add disablePino flag to stagehand constructor params -
#620
566e587Thanks @kamath! - You can now pass in an OpenAI instance as anllmClientto the Stagehand constructor! This allows you to use Stagehand with any OpenAI-compatible model, like Ollama, Gemini, etc., as well as OpenAI wrappers like Braintrust. -
#586
c57dc19Thanks @sameelarif! - Added native Stagehand agentic loop functionality. This allows you to build agentic workflows with a single prompt without using a computer-use model. To try it out, create astagehand.agentwithout passing in a provider.
Patch Changes
-
#580
179e17cThanks @seanmcguire12! - refactor _performPlaywrightMethod -
#608
71ee10dThanks @seanmcguire12! - added support for "scrolling to next/previous chunk" -
#594
e483484Thanks @seanmcguire12! - pass observeHandler into actHandler -
#569
17e8b40Thanks @seanmcguire12! - you can now call stagehand.metrics to get token usage metrics. you can also set logInferenceToFile in stagehand config to log the entire call/response history from stagehand & the LLM. -
#617
affa564Thanks @seanmcguire12! - use a11y tree for default extract -
#589
0c4b1e7Thanks @miguelg719! - Added CDP support for screenshots, find more about the benefits here: https://docs.browserbase.com/features/screenshots#why-use-cdp-for-screenshots%3F -
#584
c7c1a80Thanks @miguelg719! - Fix to remove unnecessary healtcheck ping on sdk -
#616
2a27e1cThanks @miguelg719! - Fixed new opened tab handling for CUA models -
#582
dfd24e6Thanks @seanmcguire12! - support api usage for extract with no args -
#563
98166d7Thanks @seanmcguire12! - support scrolling inact -
#598
53889d4Thanks @miguelg719! - Fix the open operator handler to work with anthropic -
#605
b8beaecThanks @sameelarif! - Added support for resuming a Stagehand session created on the API. -
#612
cd36068Thanks @seanmcguire12! - remove all logic related to dom based act -
#577
4fdbf63Thanks @seanmcguire12! - remove debugDom -
#603
2a14a60Thanks @seanmcguire12! - rm unused handlePossiblePageNavigation -
#614
a59eaefThanks @kamath! - override whatwg-url to avoid punycode warning -
#573
c24f3c9Thanks @seanmcguire12! - return act result in actFromObserve