Stagehand

Package

SDK for AI browser automation with act, extract and observe calls

Price
Free, open source
Access
LLM API key

About

Stagehand is an MIT-licensed SDK from Browserbase for TypeScript, Python and Go that mixes plain code with natural-language browser actions. It drives local Chrome or Browserbase cloud browsers over CDP and needs an LLM API key.

What you can do with it

  • Click, type and navigate with natural-language instructions in code
  • Extract structured data from a page into a Zod or Pydantic schema
  • Mix fixed Playwright-style steps with AI steps in one script

Get started

  1. Install @browserbasehq/stagehand and zod@~4.4.3
  2. Install Chrome, or use a Browserbase API key for cloud browsers
  3. Set your LLM provider's API key, e.g. OPENAI_API_KEY

Example

import { localBrowser, Stagehand } from "@browserbasehq/stagehand";

const browser = await localBrowser.launch();
const stagehand = await Stagehand.create({
  browser,
  model: { modelName: "openai/gpt-5.6-sol", apiKey: process.env.OPENAI_API_KEY },
});
const [page] = await browser.context.pages();
await page.goto("https://stagehand.dev");
await stagehand.act("Click the 'Evals' button.");
await stagehand.close();
await browser.close();

Details

Hosting
Runs locally
Available in
Worldwide
Official SDKs
JavaScript/TypeScript, Python, Go
MCP server
None

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .