
Framework Browserbase
Stagehand
Browserbase's open-source SDK for browser agents, with act, extract and observe primitives in TypeScript, Python and Go.
What it is
Stagehand is an MIT-licensed SDK from Browserbase for automating websites with AI. It drives Chromium over the Chrome DevTools Protocol and adds natural-language primitives: act performs an action, extract returns data matching a schema, and observe lists the actions available on a page. It runs locally against your own Chrome with your own model key, or on Browserbase cloud browsers, which add the Model Gateway, caching and proxies. It is for developers mixing code and AI in browser automations.
What it's useful for
Extracting a typed product table from a site with extract while keeping the login steps as ordinary code.
Key features
- act, extract (schema-based) and observe primitives
- TypeScript, Python and Go SDKs
- Models from OpenAI, Anthropic, Google, Groq and Cerebras, or a custom LLM callback
- Runs locally with Chrome, no Browserbase account needed
- Browserbase-hosted MCP server exposes navigate, act, observe and extract
- Model Gateway on Browserbase at provider prices with no markup
How to use it
Before you start
- Chrome installed for local use
- A model provider API key, or a Browserbase account for the Model Gateway
pnpm add @browserbasehq/stagehand 'zod@~4.4.3'pip install stagehandgo get github.com/browserbase/stagehand/packages/sdk-go/v4@v4.0.0Commands are copied from the official documentation. Check the docs for the latest version before running them.
Limitations to know
- The Model Gateway and server-side caching need Browserbase-hosted browsers
- Native model support covers five providers (OpenAI, Anthropic, Google, Groq, Cerebras); others such as Bedrock or Azure OpenAI need a custom LLM callback, and you pass provider keys in code
- Browserbase's free plan is small (1 browser hour, 15-minute sessions); paid plans start at $20/month
Alternatives
Open-source Python library for building AI agents that browse and act on websites, with an optional hosted cloud.
Open-source Python framework for multi-agent automation using role-based Crews and event-driven Flows.
TypeScript framework for AI agents and graph-based workflows with memory, RAG, evals and model routing.
Pydantic's typed Python framework for agents, with model fallback, durable execution, evals and a harness.
MCP servers for this
Redis's official MCP server that lets agents store, read and search data in Redis, including JSON documents and vectors.
Browserbase's hosted MCP server that lets agents drive cloud browsers with natural-language Stagehand actions.
Google Chrome team's MCP server and CLI that let coding agents control, debug and profile a live Chrome browser.
Skills for this
Hugging Face's Agent Skills for the Hub CLI, datasets, model training, evaluation, Spaces and SageMaker deployment.
Anthropic skill that guides Claude through designing, building and evaluating MCP servers in TypeScript or Python.
Related resources
Anthropic's REST API for Claude models, with official SDKs in Python, TypeScript, Go, Java, C#, PHP and Ruby.
Anthropic's collection of starter projects for building apps and agents on the Claude API.
Python library for getting validated, typed structured output from LLMs using Pydantic models.
Mistral AI's pay-as-you-go API for chat, code completion, OCR, embeddings, audio and agents, with Python and TypeScript SDKs.