stagehand: Build AI Agents That Use Websites

Summary
Stagehand is a browser automation SDK for AI agents, combining Playwright-style controls with natural-language actions and structured data extraction. It supports TypeScript, Python, and Go, and can run with a local browser or Browserbase.
At a glance
- Language
- TypeScript
- License
- MIT
- Stars
- 25.5k
- Forks
- 1.8k
- Added to OSRepos
- October 11, 2025
- Last analyzed
- October 3, 2026
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Overview
Stagehand helps developers build agents that interact with websites and extract data from them. It combines familiar browser-driver APIs with model-assisted actions, page observation, and schema-based extraction, addressing the brittleness of scripts that depend on fixed selectors and page layouts.
Use it when an application needs an AI model to interpret or adapt to changing web pages while retaining direct browser controls. The project offers SDKs for TypeScript, Python, and Go, with options for local browser sessions or Browserbase-hosted sessions.
Key Features
act()performs browser actions described in natural language.observe()identifies page elements and returns selectors that can be used with browser locators.extract()returns data validated against a supplied schema.- Playwright-style APIs support direct navigation, locators, and other browser operations.
- Browser sessions can preserve cookies using a local user data directory.
- Includes WebMCP support, clipboard support, batch commands, and locators for nested iframes and closed Shadow DOMs.
- Provides TypeScript, Python, and Go SDKs, plus a hosted MCP server integration.
- Offers search and URL-fetch add-ons that can retrieve web content without a browser session.
Use Cases
- Build an agent that signs in to a web application and gathers structured records from tables.
- Automate browser workflows where page changes make fixed selectors unreliable.
- Let coding agents navigate and interact with websites through an MCP client.
- Collect information from web pages using browser sessions, or use search and fetch for lighter-weight retrieval.
Project Facts
- Language: TypeScript
- License: MIT
- Stars: 25.5k
- Forks: 1.8k
- Topics: agents, ai, ai-agents, browser-agent, browser-automation, cdp, cloud-browser, data-extraction, headless-chrome, playwright, python, typescript, web-automation, web-scraping
- Archived: no
Getting Started
Install the TypeScript SDK and its documented Zod dependency:
pnpm add @browserbasehq/stagehand 'zod@~4.4.3'
Local runs require Chrome. See the quickstart and README for setup and Python or Go instructions.
Alternatives
- PinchTab: PinchTab is a Go-based Chrome control bridge and multi-instance orchestrator, rather than a cross-language SDK pairing Playwright-style controls with natural-language actions.
- CloakBrowser: CloakBrowser focuses on fingerprint changes to evade bot detection and exposes Playwright- and Puppeteer-compatible APIs, rather than adding natural-language browser actions.
- Browserable: Browserable is a self-hostable browser automation library for agent tasks, while Stagehand emphasizes a developer SDK with Playwright-style controls and structured extraction.
- browser-rs-mcp: browser-rs-mcp exposes browser controls as MCP tools for agents sharing a persistent Chrome instance, rather than as a browser automation SDK.
Considerations
- AI-powered actions require a configured model and API key for local use. Browserbase can provide a Model Gateway option for hosted sessions.
- Local browser runs require Chrome; hosted browser sessions require a Browserbase API key.
- Natural-language automation still depends on model behavior and the state of the target website, so validate workflows and extracted data for your application.
- The repository is actively maintained and has a substantial open issue count; check the issue tracker for current bugs and limitations.
Comparisons
Source repository
Open the original repository on GitHub.
20 counted GitHub visits
Related repositories
Similar repositories that may be relevant next.

skillrank: Find and Evaluate AI-Agent Skills
October 4, 2026
SkillRank is a Rust CLI for discovering, installing, and evaluating skills used by coding agents. Its paired local evaluations compare a skill-enabled run with a control to show changes in success, tokens, time, and cost.

agentevals: Evaluate AI Agents from OpenTelemetry Traces
October 4, 2026
agentevals scores AI agent behavior from existing OpenTelemetry traces, without rerunning agents or making extra model calls. It suits teams building instrumented agents that need local evaluation, golden-set checks, or CI quality gates.

agent-observability: Monitor AI Coding Agents Locally
October 3, 2026
A self-hosted OpenTelemetry stack for monitoring Claude Code and OpenAI Codex. It routes telemetry to Prometheus, Loki, and Tempo, then presents usage, performance, and activity in Grafana dashboards.

web-design: Create Consistent Web Pages with a Claude Code Skill
October 3, 2026
web-design is a Claude Code skill that turns product briefs, reference URLs, or screenshots into an editable design specification before generating web code. It is suited to developers and designers who want a repeatable, spec-led workflow for building consistent pages.