← Back to all projects

Stagehand
Playwright you can mix with natural-language instructions
OfficialMIT
What is Stagehand?
Lets you write deterministic Playwright for the steps you already know and drop into natural language only where the page is unpredictable. That mix is the pragmatic middle ground: fully AI-driven automation is slow and flaky, fully scripted automation breaks on redesigns.
What can you do with Stagehand?
- Mix natural language with locators —
stagehand.act("click on the stagehand repo")handles a step you cannot predict, whileobserve()hands back concrete selectors you can replay deterministically through Playwright-stylepage.locator(...).click(). - Extract page data to a schema —
stagehand.extract()takes a Zod schema and returns exactly the fields you declared, so page content arrives as typed values rather than text you parse yourself. - Survive site redesigns —
act,observeandextractare self-healing: when a site changes, Stagehand detects it and refreshes how the action is carried out instead of failing on a selector that no longer matches. - Reach into nested DOM structures — Deep locators reach inside out-of-process iframes and closed Shadow DOM, which ordinary automation cannot cross, and clipboard support and batch commands come alongside.
- Work in TypeScript, Python or Go — One browser driver ships as three SDKs —
@browserbasehq/stagehandon npm pluspackages/sdk-pythonandpackages/sdk-goin the same monorepo — whichjust installandjust buildcompile together.
Star history
15 Aug to 30 Oct · +1.9k
23.9k25.9k
Frequently asked questions
Is Stagehand free for commercial use?
Stagehand is released under the MIT licence — OSI-approved open source, which permits commercial use.
How can Stagehand be deployed?
Stagehand is available as Self-hosted / Runs locally / Managed cloud.