Stagehand is the AI browser automation framework. Built on Playwright, it enables LLM-powered web automation with natural language instructions. Supports multiple AI providers for intelligent page interaction, element detection, and data extraction. Replaces brittle CSS selectors with AI-driven element identification, making browser automation more resilient and maintainable. Ideal for web scraping, testing, and building AI agents that interact with the web.
git clone https://github.com/browserbase/stagehand.git
import { Stagehand } from "@browserbase/stagehand";
const stagehand = new Stagehand();
await stagehand.init();
// Navigate and interact with AI
await stagehand.page.goto("https://example.com");
await stagehand.act("click the login button");
await stagehand.act("type admin in username");
// Extract data
const data = await stagehand.extract(
"get all product names and prices"
);