Scrape data from websites by describing what information you need in plain English.
Automate form filling and data entry tasks that adapt when page layouts change.
Test web applications by writing mixed code and natural language instructions.
Build AI agents that can browse the web and interact with unfamiliar pages independently.
Requires API key for LLM service and browser driver installation.
Stagehand is a framework for automating web browsers using a mix of plain English instructions and code. It solves the problem that existing browser automation tools force you to choose between writing precise but brittle low-level code or using AI agents that are flexible but unpredictable. Stagehand lets you use whichever approach fits each situation. When you know exactly what you want, click this button, fill in this form, you write it as code. When you are navigating an unfamiliar page or need the automation to adapt, you describe what you want in natural language and the AI figures out how to do it. The two approaches can be mixed freely in the same script. A key feature is self-healing automation: Stagehand caches the steps it has figured out, so repeated runs happen without calling the AI at all. If the website changes and the automation breaks, it automatically recognizes this and uses the AI again to adapt. This makes it practical for production use, not just one-off scripts. You would use Stagehand to build automated web workflows, scraping data, filling out forms, testing web apps, or building AI agents that need to browse the web. The library is written in TypeScript and works with a browser connection. A Python version is also available in a separate repository.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.