About this project

Stagehand is an open-source SDK designed for building browser agents. It enables developers to automate web interactions, extract structured data, and manage browser sessions using natural language instructions. The SDK supports TypeScript, Python, and Go, providing a unified API across these languages. Key capabilities include: - Core Methods: act for performing actions, observe for finding elements and returning real selectors, and extract for pulling schema-validated data. - Familiar APIs: Utilizes Playwright-style methods like goto, click, and locator. - Self-healing: Automatically refreshes action execution when website layouts change. - Token Efficiency: Employs hybrid accessibility-tree trimming to provide agents with necessary page context. - Session Persistence: Supports local browser data directories to maintain cookies and sessions across runs. - Cloud Execution: Can run on Browserbase for faster execution, featuring a Model Gateway to select cost-effective models and server-side caching for repeated actions. - MCP Integration: Provides a hosted Model Context Protocol (MCP) server to integrate browser capabilities into coding agents like Claude Code and Cursor without local installation. - Search and Fetch: Includes add-ons for web searching and retrieving URL content as markdown without launching a full browser. The project is MIT-licensed and managed as a monorepo.