# Stagehand

CreateWithAI Hub page: https://createwithaihub.com/frameworks/stagehand
Latest version of this file: https://createwithaihub.com/frameworks/stagehand.md

- Type: Framework · Category: Harnesses & Frameworks
- Publisher: Browserbase
- Pricing: Free · License: MIT

Browserbase's open-source SDK for browser agents, with act, extract and observe primitives in TypeScript, Python and Go.

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.

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

## Connection

- Language: Python, TypeScript / JS, Go
- Focus: Agents & tool use
- Model support: Multi-provider

## Before you start

- Chrome installed for local use
- A model provider API key, or a Browserbase account for the Model Gateway

## Install steps from the official documentation

TypeScript:

```
pnpm add @browserbasehq/stagehand 'zod@~4.4.3'
```

Python:

```
pip install stagehand
```

Go:

```
go get github.com/browserbase/stagehand/packages/sdk-go/v4@v4.0.0
```

## Limitations

- 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

## Official links

- Website: https://www.stagehand.dev
- Source repository: https://github.com/browserbase/stagehand
- Documentation: https://docs.stagehand.dev
- Source: https://github.com/browserbase/stagehand (README: SDK for browser agents, act/extract/observe, install commands for TS/Python/Go, local use without Browserbase, hosted MCP, MIT)
- Source: https://raw.githubusercontent.com/browserbase/stagehand/main/LICENSE (MIT License, Copyright (c) 2024 Browserbase Inc.)
- Source: https://docs.stagehand.dev (Primitives, CDP-based driver, TypeScript/Python/Go SDKs)
- Source: https://docs.stagehand.dev/v4/configuration/models.md (Providers (OpenAI, Anthropic, Google, Groq, Cerebras), Model Gateway needs Browserbase, no markup, BYO key)
- Source: https://www.browserbase.com/pricing (Browserbase Free $0 (1 browser hour, 3 concurrent, 15-minute sessions), Developer $20, Startup $99, Scale custom)
- Source: https://www.stagehand.dev ('The SDK for browser agents' by Browserbase; TypeScript, Python and Go; npm install @browserbasehq/stagehand; v4.0.0)
