v2.0.0
Major Changes
-
#591
e234a0f
Thanks @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
act
andextract
: 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
ba9efc5
Thanks @sameelarif! - Added support for offloading agent tasks to the API. -
#600
11e015d
Thanks @sameelarif! - Added astagehand.history
array which stores an array ofact
,extract
,observe
, andgoto
calls made. Since this history array is stored on theStagehandPage
level, it will capture methods even if indirectly called by an agent. -
#601
1d22604
Thanks @seanmcguire12! - add custom error classes -
#599
75d8fb3
Thanks @miguelg719! - cleaner logging with pino -
#609
c92295d
Thanks @kamath! - Removed deprecated fields and methods from Stagehand constructor and added cdpUrl to localBrowserLaunchOptions for custom CDP URLs support. -
#571
73d6736
Thanks @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
7b0b996
Thanks @sameelarif! - add disablePino flag to stagehand constructor params -
#620
566e587
Thanks @kamath! - You can now pass in an OpenAI instance as anllmClient
to 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
c57dc19
Thanks @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.agent
without passing in a provider.
Patch Changes
-
#580
179e17c
Thanks @seanmcguire12! - refactor _performPlaywrightMethod -
#608
71ee10d
Thanks @seanmcguire12! - added support for "scrolling to next/previous chunk" -
#594
e483484
Thanks @seanmcguire12! - pass observeHandler into actHandler -
#569
17e8b40
Thanks @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
affa564
Thanks @seanmcguire12! - use a11y tree for default extract -
#589
0c4b1e7
Thanks @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
c7c1a80
Thanks @miguelg719! - Fix to remove unnecessary healtcheck ping on sdk -
#616
2a27e1c
Thanks @miguelg719! - Fixed new opened tab handling for CUA models -
#582
dfd24e6
Thanks @seanmcguire12! - support api usage for extract with no args -
#563
98166d7
Thanks @seanmcguire12! - support scrolling inact
-
#598
53889d4
Thanks @miguelg719! - Fix the open operator handler to work with anthropic -
#605
b8beaec
Thanks @sameelarif! - Added support for resuming a Stagehand session created on the API. -
#612
cd36068
Thanks @seanmcguire12! - remove all logic related to dom based act -
#577
4fdbf63
Thanks @seanmcguire12! - remove debugDom -
#603
2a14a60
Thanks @seanmcguire12! - rm unused handlePossiblePageNavigation -
#614
a59eaef
Thanks @kamath! - override whatwg-url to avoid punycode warning -
#573
c24f3c9
Thanks @seanmcguire12! - return act result in actFromObserve