fb74c90 Thanks @miguelg719! - Version bump to 2.5.4#1273 ab51232 Thanks @seanmcguire12! - fix: trigger shadow root rerender in OOPIFs by cloning & replacing instead of reloading
#1268 c76ade0 Thanks @tkattkat! - Expose reasoning, and cached input tokens in stagehand metrics
#1267 ffb5e5d Thanks @seanmcguire12! - fix: file uploads failing on Browserbase
#1269 772e735 Thanks @tkattkat! - Add example using playwright screen recording
#1245 a224b33 Thanks @seanmcguire12! - allow act() to call hover()
#1234 6fc9de2 Thanks @miguelg719! - Add a page.sendCDP method
#1233 4935be7 Thanks @seanmcguire12! - extend page.screenshot() options to mirror playwright
#1232 bdd76fc Thanks @seanmcguire12! - export Page type
#1229 7ea18a4 Thanks @tkattkat! - Adjust extract tool + expose extract response in agent result
#1239 d4de014 Thanks @miguelg719! - Fix stagehand.metrics on api mode
#1241 2d1b573 Thanks @miguelg719! - Return response on page.goto api mode
#1253 5556041 Thanks @seanmcguire12! - fix missing page issue when connecting to existing browser
#1235 7e4b43e Thanks @seanmcguire12! - make page.goto() return a Response object
#1254 7e72adf Thanks @sameelarif! - Added custom error types to allow for a smoother debugging experience.
#1227 9bf09d0 Thanks @miguelg719! - Fix readme's media links and add instructions for installing from a branch
#1257 92d32ea Thanks @tkattkat! - Add support for a custom baseUrl with google cua client
#1230 ebcf3a1 Thanks @seanmcguire12! - add stagehand.browserbaseSessionID getter
#1262 c29a4f2 Thanks @miguelg719! - Remove error throwing when api and experimental are both set
#1223 6d21efa Thanks @miguelg719! - Disable api mode when using custom LLM clients
#1228 525ef0c Thanks @Kylejeong2! - update slack link in docs
#1226 9ddb872 Thanks @seanmcguire12! - add support for page.on('console') events
#1207 55da8c6 Thanks @miguelg719! - Fix broken links to quickstart docs
#1200 0a5ee63 Thanks @seanmcguire12! - log info when scope narrowing selector fails
#1205 ee76881 Thanks @miguelg719! - Update README.md, add Changelog for v3
#1209 9e95add Thanks @seanmcguire12! - fix circular import in exported aisdk example client
#1211 98e212b Thanks @miguelg719! - Add an example for passing custom tools to agent
#1206 d5ecbfc Thanks @miguelg719! - Export example AISdkClient properly from the stagehand package
c0fbc51 Thanks @seanmcguire12! - configure default viewport when running on browserbase#1082 8c0fd01 Thanks @tkattkat! - Pass stagehand object to agent instead of stagehand page
#1104 a1ad06c Thanks @miguelg719! - Fix logging for stagehand agent
#1066 9daa584 Thanks @tkattkat! - Add playwright arguments to agent execute response
#1077 7f38b3a Thanks @tkattkat! - adds support for stagehand agent in the api
#1032 bf2d0e7 Thanks @miguelg719! - Fix for zod peer dependency support
#1014 6966201 Thanks @tkattkat! - Replace operator handler with base of new agent
#1089 536f366 Thanks @miguelg719! - Fixed info logs on api session create
#1103 889cb6c Thanks @tkattkat! - patch custom tool support in anthropic cua client
#1056 6a002b2 Thanks @chrisreadsf! - remove need for duplicate project id if already passed to Stagehand
#1090 8ff5c5a Thanks @miguelg719! - Improve failed act error logs
#1014 6966201 Thanks @tkattkat! - replace operator agent with scaffold for new stagehand agent
#1107 3ccf335 Thanks @seanmcguire12! - fix: url extraction not working inside an array
#1102 a99aa48 Thanks @miguelg719! - Add current page and date context to agent
#1110 dda52f1 Thanks @miguelg719! - Add support for new Gemini Computer Use models
8244ab2 Thanks @sameelarif! - Added support for stagehand.agent to interact with MCP servers as well as custom tools to be passed in. For more information, reference the MCP integrations documentation#959 09b5e1e Thanks @filip-michalsky! - add webvoyager evals
#1049 e3734b9 Thanks @miguelg719! - Support local MCP server connections
#1025 be85b19 Thanks @tkattkat! - add support for custom baseUrl within openai provider
#1040 88d1565 Thanks @miguelg719! - Allow OpenAI CUA to take in an optional baseURL
#1046 ab5d6ed Thanks @tkattkat! - Add support for gpt-5 in operator agent
9e8c173 Thanks @miguelg719! - Fix disabling api validation whenever a customLLM client is provided#951 f45afdc Thanks @miguelg719! - Patch GPT-5 new api format
#954 261bba4 Thanks @seanmcguire12! - add support for shadow DOMs (open & closed mode) when experimental: true
#944 8de7bd8 Thanks @seanmcguire12! - Bump zod version compatibility and add pathing spec
#919 3d80421 Thanks @seanmcguire12! - enable scrolling inside of iframes
#963 0ead63d Thanks @tkattkat! - Properly handle images in evaluator + clean up response parsing logic
#961 8422828 Thanks @tkattkat! - Add more evals for stagehand agent
#946 b769206 Thanks @seanmcguire12! - fix: unable to act on/get content from some same process iframes
#962 72d2683 Thanks @seanmcguire12! - handle namespaced elements in xpath build step
#865 6b4e6e3 Thanks @seanmcguire12! - improve type safety for trimTrailingTextNode
#897 e77d018 Thanks @miguelg719! - Fix selfHeal to remember intially received arguments
#920 c20adb9 Thanks @seanmcguire12! - fix: tab handling on API
#882 b86df93 Thanks @seanmcguire12! - remove elements that don't have xpaths from observe response
#905 023c2c2 Thanks @tkattkat! - Delete old images from anthropic cua client
#925 8c28647 Thanks @miguelg719! - Remove _refreshPageFromApi()
#887 87e09c6 Thanks @seanmcguire12! - fix: allow xpaths with prepended 'xpath=' for targeted extract
#864 a611115 Thanks @miguelg719! - Temporarily patch custom clients serialization error on api
#881 69913fe Thanks @miguelg719! - Pass sdk version number to API for debugging
#913 b1b83a1 Thanks @seanmcguire12! - move iframe out of 'experimental'
#891 be8497c Thanks @seanmcguire12! - fix: nested iframe xpath bug
#883 98704c9 Thanks @seanmcguire12! - add timeout for JS click
#907 04978bd Thanks @seanmcguire12! - store mapping of CDP frame ID -> page
#856 8a43c5a Thanks @seanmcguire12! - set download behaviour by default
#857 890ffcc Thanks @miguelg719! - return "not-supported" for elements inside the shadow-dom
#844 64c1072 Thanks @seanmcguire12! - don't automatically close tabs
#860 b077d3f Thanks @miguelg719! - Set default schema on extract options with no schema
#842 8bcb5d7 Thanks @seanmcguire12! - improved handling for OS level dropdowns
#846 7bf10c5 Thanks @miguelg719! - Filter attaching to target worker / shared_worker
6a18c1e Thanks @seanmcguire12! - try playwright click and fall back to JS click event#826 124e0d3 Thanks @seanmcguire12! - fix issue where we are unable to take actions on text nodes
#818 1660751 Thanks @miguelg719! - Added CUA support for Claude 4 models
#821 cadac9d Thanks @seanmcguire12! - use playwright instead of playwright test
#832 759da55 Thanks @miguelg719! - Fix _refreshPageFromAPI to use parametrized apiKey
#810 a175a51 Thanks @miguelg719! - Update logos
#822 8527a80 Thanks @miguelg719! - Add model with date tag for OpenAI CUA
#833 55fca2f Thanks @seanmcguire12! - adjust stagehandLogger.warn() level to be 1 instead of 0
#796 12a99b3 Thanks @miguelg719! - Added a experimental flag to enable the newest and most experimental features
#807 2451797 Thanks @seanmcguire12! - include version number in StagehandDefaultError message
#803 1d631a5 Thanks @miguelg719! - Enable session affinity for cache optimization
#804 9c398bb Thanks @seanmcguire12! - update operatorResponseSchema based on new openai spec
#786 c19ad7f Thanks @miguelg719! - Handle reroute to account for rollout
6ef6073 Thanks @seanmcguire12! - deprecate useTextExtract and remove functionality#741 5680d25 Thanks @seanmcguire12! - use safeparse for zod validation
#783 4de92a8 Thanks @miguelg719! - Fix the readme logo link
#721 be8652e Thanks @miguelg719! - Fix stagehand.close() functionality to include calling browser.close()
#724 6b413b7 Thanks @seanmcguire12! - rm refine step in extract
#712 7eafbd9 Thanks @seanmcguire12! - deprecated onlyVisible param and remove its functionality
#725 1b50aa6 Thanks @seanmcguire12! - dont overwrite .describe() when user defines a zod schema with z.string().url().describe()
#717 f2b7f1f Thanks @seanmcguire12! - don't publish uncompiled ts to npm
#719 c8d672f Thanks @seanmcguire12! - fix Invalid schema for response_format error when extracting links
#722 bebf204 Thanks @seanmcguire12! - replace NBSP with regular space & remove special characters from dom+a11y tree
#714 37d6810 Thanks @miguelg719! - Fix the native AI SDK client implementation to optionally take in an API key
#655 8814af9 Thanks @seanmcguire12! - extract links
#675 35c55eb Thanks @tkattkat! - Added Gemini 2.5 Flash to Google supported models
#668 5c6d2cf Thanks @miguelg719! - Added a new class - Stagehand Evaluator - that wraps around a Stagehand object to determine whether a task is successful or not. Currently used for agent evals
#706 18ac6fb Thanks @seanmcguire12! - remove unused fillInVariables fn
#692 6b95248 Thanks @miguelg719! - Updated the list of OpenAI models (4.1, o3...)
#688 7d81b3c Thanks @seanmcguire12! - wrap page.evaluate to make sure we have injected browser side scripts before calling them
#664 b5ca00a Thanks @miguelg719! - remove unnecessary log
#683 8f0f97b Thanks @seanmcguire12! - use javsacript click instead of playwright
#705 346ef5d Thanks @miguelg719! - Fixed removing a hanging observation map that is no longer used
#698 c145bc1 Thanks @sameelarif! - Fixing LLM client support to natively integrate with AI SDK
#687 edd6d3f Thanks @miguelg719! - Fixed the schema input for Gemini's response model
#678 5ec43d8 Thanks @seanmcguire12! - allow form filling when form is not top-most element
#694 b8cc164 Thanks @seanmcguire12! - add telemetry for cua agents to stagehand.metrics
#699 d9f4243 Thanks @seanmcguire12! - rm deprecated primitives from stagehand object
#710 9f4ab76 Thanks @seanmcguire12! - support targeted extract for domExtract
#677 bc5a731 Thanks @miguelg719! - Fixes a redundant unnecessary log
f9a435e Thanks @miguelg719! - Added native support for Google Generative models (Gemini)#647 ca5467d Thanks @seanmcguire12! - collapse redundant text nodes into parent elements
#636 9037430 Thanks @seanmcguire12! - fix token act metrics and inference logging being misplaced as observe metrics and inference logging
#648 169e7ea Thanks @seanmcguire12! - add mapping of node id -> url
#654 57a9853 Thanks @seanmcguire12! - fix repeated up & down scrolling bug for clicks inside act
#624 cf167a4 Thanks @seanmcguire12! - export stagehand error classes so they can be referenced from @dist
#640 178f5f0 Thanks @yash1744! - Added support for stagehand agents to automatically redirect to https://google.com when the page URL is empty or set to about:blank, preventing empty screenshots and saving tokens.
#633 86724f6 Thanks @miguelg719! - Fix the getBrowser logic for redundant api calls and throw informed errors
#656 c630373 Thanks @seanmcguire12! - parse out % signs from variables in act
#637 944bbbf Thanks @kamath! - Fix: forward along the stack trace in StagehandDefaultError
#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.
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 moreact and extract: Major performance improvements to make your automations run significantly faster.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.
#588 ba9efc5 Thanks @sameelarif! - Added support for offloading agent tasks to the API.
#600 11e015d Thanks @sameelarif! - Added a stagehand.history array which stores an array of act, extract, observe, and goto calls made. Since this history array is stored on the StagehandPage 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 an llmClient 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 a stagehand.agent without passing in a provider.
#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 in act
#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
#518 516725f Thanks @sameelarif! - act() can now use observe() under the hood, resulting in significant performance improvements. To opt-in to this change, set slowDomBasedAct: false in ActOptions.
#483 8c9445f Thanks @seanmcguire12! - When using textExtract, you can now do targetted extraction by passing an xpath string into extract via the selector parameter. This limits the dom processing step to a target element, reducing tokens and increasing speed. For example:
const weatherData = await stagehand.page.extract({
instruction: "extract the weather data for Sun, Feb 23 at 11PM",
schema: z.object({
temperature: z.string(),
weather_description: z.string(),
wind: z.string(),
humidity: z.string(),
barometer: z.string(),
visibility: z.string(),
}),
modelName,
useTextExtract,
selector: xpath, // xpath of the element to extract from
});
#556 499a72d Thanks @kamath! - You can now set a timeout for dom-based stagehand act! Do this in act with timeoutMs as a parameter, or set a global param to actTimeoutMs in Stagehand config.
#544 55c9673 Thanks @seanmcguire12! - you can now deterministically get the full text representation of a webpage by calling extract() (with no arguments)
#538 d898d5b Thanks @sameelarif! - Added gpt-4.5-preview and claude-3-7-sonnet-latest as supported models.
#523 44cf7cc Thanks @kwt00! You can now natively run Cerebras LLMs! cerebras-llama-3.3-70b and cerebras-llama-3.1-8b are now supported models as long as CEREBRAS_API_KEY is set in your environment.
#542 cf7fe66 Thanks @sankalpgunturi! You can now natively run Groq LLMs! groq-llama-3.3-70b-versatile and groq-llama-3.3-70b-specdec are now supported models as long as GROQ_API_KEY is set in your environment.
#506 e521645 Thanks @miguelg719! - fixing 5s timeout on actHandler
#535 3782054 Thanks @miguelg719! - Adding backwards compatibility to new act->observe pipeline by accepting actOptions
#508 270f666 Thanks @miguelg719! - Fixed stagehand to support multiple pages with an enhanced context
#559 18533ad Thanks @seanmcguire12! - fix: continuously adjusting chunk size inside act
#554 5f1868b Thanks @seanmcguire12! - fix targetted extract issue with scrollintoview and not chunking correctly
#555 fc5e8b6 Thanks @seanmcguire12! - fix issue where processAllOfDom doesnt scroll to end of page when there is dynamic content
#552 a25a4cb Thanks @seanmcguire12! - accept xpaths with 'xpath=' prepended to the front in addition to xpaths without
#534 f0c162a Thanks @seanmcguire12! - call this.end() if the process exists
#528 c820bfc Thanks @seanmcguire12! - handle attempt to close session that has already been closed when using the api
#520 f49eebd Thanks @miguelg719! - Performing act from a 'not-supported' ObserveResult will now throw an informed error
a7d345e Thanks @miguelg719! - Bun runs will now throw a more informed error