Skip to main content
Install Stagehand in your current app with the TypeScript or Python SDK.
For TypeScript/Node.js: We highly recommend using the Node.js runtime environment to run Stagehand scripts, as opposed to newer alternatives like Deno or Bun.Bun does not support Stagehand since it doesn’t support Playwright.For Python: We require Python 3.9+ and recommend using uv to manage your virtual environment.

Install dependencies

If you plan to run locally, install browsers once: npx playwright install. For cloud browser sessions, skip this.

Configure environment

Set environment variables (or a .env via your framework):

Use in your codebase

Add Stagehand where you need browser automation.

Next steps

Configuration

Environment, Browserbase vs Local, logging, timeouts, LLM customization

Act

Perform precise actions with natural language

Extract

Typed data extraction with Zod schemas

Observe

Discover elements and suggested actions