
Stagehand
Open-source SDK for building browser agents with Playwright-style APIs plus natural-language act, observe and extract
Stagehand is an open-source SDK from Browserbase for building browser agents. Developers mix Playwright-style methods with natural-language commands so an agent can act on a page, observe it and extract structured data that matches a schema.
Key features:
- Familiar methods such as goto, click, locator and screenshot.
- Natural-language act, observe and extract primitives.
- Self-healing actions that adjust when a site's markup changes.
- Trimmed accessibility tree so agents receive less page context and use fewer tokens.
- Runtime that sits next to the browser as an extension to cut round-trip latency.
- Support for WebMCP, clipboard access, batched commands, nested iframes, closed Shadow DOM and OpenTelemetry tracing.
Stagehand is available for TypeScript, Python and Go and installs from npm as @browserbasehq/stagehand or the equivalent package managers. It runs with a local browser or on Browserbase's cloud browsers, supports domain allowlists and blocklists, and is free to use.