browserbase

stagehand: Build AI Agents That Use Websites

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.

View on GitHub Compare
Stars
25.5k
Forks
1.8k
Stars, last 30 days
+340

Our take

Health score

64/100

How it is scored
Activity
85
Community
74
Issues
53
Pull requests
42

+340 stars in the last 30 days

  • Releases more often than 87% of the projects we track
  • Slower to merge pull requests than 86% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

26,094

Forks

1,835

Change since Nov 19, 2026: -1 stars·+1 forks

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.

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.
ProjectLanguageLicenseStarsStatus
stagehandTypeScriptMIT25.5kNot checked yet
pinchtabGoMIT10.3kActive
CloakBrowserPythonMIT31.9kActive
browserableJavaScriptMIT1.2kInactive
browser-rs-mcpRustApache-2.025New

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.

Found this useful?

Share it with someone who would like stagehand.

Comparisons