← Back to all projects

Stagehand

Playwright you can mix with natural-language instructions

OfficialMIT
Stars
25.9k
Forks
1.8k
Open issues
395
Last commit
30 Oct 2026

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, while observe() hands back concrete selectors you can replay deterministically through Playwright-style page.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, observe and extract are 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/stagehand on npm plus packages/sdk-python and packages/sdk-go in the same monorepo — which just install and just build compile 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.