Stagehand
An MIT-licensed browser agent SDK that automates local Chrome, extracts structured data and supports self-hosted models through a custom callback.

Stagehand is an open-source browser agent SDK for developers automating websites and collecting structured data in local Chrome. Model inference is separate from browser execution: direct provider calls send model context remotely, while a custom callback can connect a self-hosted model. Local runs require Chrome.
Natural-language actions work alongside Playwright-style controls for clicks, element selection and screenshots. Agents can locate inputs and extract page data into a defined schema. When a site changes, Stagehand refreshes how it finds elements and performs actions, reducing dependence on fixed selectors.
Its runtime operates as a browser extension close to the page, reducing communication delays. It trims the accessibility tree before supplying page context to the model and supports elements inside nested iframes and closed Shadow DOMs. Local browser profiles can retain cookies between runs.
The MIT-licensed SDK supports TypeScript, Python and Go. WebMCP lets agents discover tools exposed by pages, while clipboard access and batched commands support browser tasks. Domain allowlists and blocklists restrict access, and OpenTelemetry traces record activity.
Browserbase is the separate hosted browser option, with persistent contexts, session recordings and server-side action caching. Its Model Gateway selects models when none is specified and requires a Browserbase-hosted browser. Local Chrome uses an explicitly configured provider or your own model callback; the callback runs in your process and can call a self-hosted inference service.