
The best browser automation framework, in every language
Browser automation shouldn’t depend on the language or driver you happen to use. Today, Stagehand becomes canonical: one implementation that works everywhere.
Copy linkCanonical Stagehand: one implementation, every language
Browser automation with Stagehand unlocks the ability to do complex open-ended tasks without having to write a lot of code.
Stagehand allows developers to compose powerful, resilient automations with a few simple words instead of having to hand-code long, brittle scripts using xpaths and x/y coordinates:
Pythonobserve('find the button to sort the price column in ascending order') act(’click on the “add to cart” button in the upper right’) extract(’extract company names of the top 8 results shown on this page’) agent('fill out this complex multi-page workflow')
However, developers in languages like Rust, PHP, C#, Kotlin have been left out of this new revolution in browser automation, and have been stuck with the early 2000’s approach of hand-coding selectors.
We’re pleased to announce that we’re changing that today with the new multi-lingual Stagehand SDK, bringing a unified first-class browser automation interface across a wide range of languages:
- Typescript (our existing stagehand library)
- Python (upgraded today to v3 support)
- Golang (new)
- Java (new)
- Ruby (new)
- Rust (new, beta)
- Php (new, alpha)
- C# (new, alpha)
- Kotlin (new, alpha)
- REST API (new), for direct use from Claude Code/MCPs/curl/n8n/etc.
With the release of these new SDKs, we’re also proud to announce two new headlining features.
Copy linkNEW: Bring-your-own-browser-driver support
Typically, AI browser automation libraries are highly opinionated and only work with a specific driver like Playwright or Puppeteer, or they force you to use their own. Our new API is actually browser-driver agnostic and work with all of them!
That means you can use your browser driver library of choice to set up the browser, perform custom logic in and around AI-powered logic, load cookies, and more, and it won’t interfere with stagehand’s AI automation. We also don’t depend on any driver internally, so you won’t have the stealth impact of loading Playwright or Puppeteer, which often lead to excessive captchas and challenge pages even when configured by experts.
This means you can use any of these:
- stagehand + chromiumoxide in rust
- stagehand + go-rod or chromedp in golang
- stagehand + playwright, pydoll, pyppeteer, in python
- stagehand + selenium in java or any other combination you can think of!
Copy linkNEW: Parallel multi-browser support!
The second headlining feature that we’re excited about is the ability to scale scripts and control dozens of browsers at once with only a single extra parameter: session_id.
Simply do stagehand.sessions.start(...) to launch as many browsers as you need in parallel, then pass act(session_id, ...), extract(session_id, ...), etc. to subsequent calls to control each specific session.
Here are some ideas of things you can build with this new ability:
- Starting one browser to do a search, then the top 10 results in a separate browsers to scrape at 10x speed!
- Having one browser filling out a form, and have 5 browsers collecting the data to fill in in parallel
- Logging in with 10 different accounts to the same site to test load or collaboration features
… just to name a few use cases.
This should make it significantly less cumbersome to manage launching, authenticating, proxying, and driving multiple browsers in parallel in our cloud.
Copy linkA concrete example
Imagine you’re extending a PHP wordpress site with a plugin that needs to extract structured data from a page after a complex login flow.
Before, your options were ugly:
- run a Node service alongside your app,
- call out over HTTP,
- pass state back and forth,
- debug failures across language boundaries.
- handling chrome launching, cleanup, and task queueing manually
With Stagehand v3, the PHP SDK can drive a browser directly without needing and entire additional backend service to manage your browsers.
With a simple call like observe('find the phone number on the bottom right') Stagehand reasons about the page, performs the extraction, and returns structured data.
We’re excited to see what people can build from ecosystems that were previously deprived of this ability. With Kotlin you can even build native Android apps that control browsers directly, a first in the ecosystem! We hope to announce Swift support later this year as well.
Copy linkProviding a high quality, consistent developer experience across multiple languages is a tough problem.
It’s hard to implement well-designed APIs consistently across a range of languages. Every language has unique conventions for basic things like parameter names, union types, error handling, async, etc.
Our new multi-language support is powered by Stainless†, which allowed us to implement a client-server RPC interface within our library, then generate a range of native SDK clients against that interface. Stainless powers other high-quality SDKs you know and love from Anthropic, OpenAI, Google, and Cloudlfare, and their platform made it easy to manage this process end-to-end.
Traditionally SDK’s are used to connect to a remote cloud service, and our library does use your BROWSERBASE_API_KEY to launch browsers in our stealth cloud by default, but we took it one step further and implemented a system to allow you to control local browsers using the same API.
This presented a unique engineering challenge: the core battle-tested part of our library is written in Typescript, and porting many thousands of lines of complex logic across all languages while maintaining perfect feature parity is nearly impossible, there would inevitably be drift.
So we followed in the footsteps of Playwright, which solves this challenge by shipping a high-performance Node SEA binary powering the core driver, and then wrapping it in per-language client APIs that automagically launch the inner binary when needed, without any config required.
Don’t worry! The entire package is still open source, you can find the source for the node package in our main repo browserbase/stagehand, and the full source code for the client layers in each language repo like browserbase/stagehand-go, browserbase/stagehand-ruby, etc.
† Note: excluding the Rust SDK, which is not powered by Stainless yet.
Copy linkWhat's launching today
Stagehand v3 launches with support for:
Python, Java, Ruby, Rust, and Go
All with the same core capabilities. The same behavior. The same guarantees.
We also have ALPHA SDKs available for early testing:
PHP, C# .NET, Kotlin
Our existing Python users can use this migration guide to see how to upgrade to the latest SDK.
Browser automation has quietly become critical infrastructure. It powers testing, onboarding, data pipelines, QA, and entire product features. But until now, it’s been locked to a small corner of the programming world.
We think that’s backwards.
Stagehand v3 is our attempt to make browser automation portable: across browser drivers, operating systems, languages, and ecosystems. The goal isn’t to win one community. It’s to stop forcing teams to choose between their language and their capabilities.
One automation framework.
Every language.
Get started here: https://docs.stagehand.dev

