stagehand  by browserbase

AI browser automation framework for production

Created 1 year ago
17,048 stars

Top 2.7% on SourcePulse

GitHubView on GitHub
Project Summary

Stagehand is a production-ready framework for AI-powered browser automation, designed for developers who need a balance between low-level control and AI-driven flexibility. It allows users to integrate state-of-the-art AI models from OpenAI and Anthropic, enabling them to use natural language for complex navigation while retaining code-based control for predictable tasks.

How It Works

Stagehand bridges the gap between traditional automation tools like Selenium and unpredictable AI agents. It allows developers to selectively use AI for unfamiliar web interactions via the act() function and leverage Playwright directly for known sequences. For more complex, multi-step AI tasks, it integrates "Computer Use" agents. The framework also supports previewing AI actions and caching repeatable steps to optimize token usage and execution time.

Quick Start & Requirements

  • Install via npx create-browser-app.
  • Requires an API key for an LLM provider (OpenAI, Anthropic) and Browserbase credentials, configured in a .env file.
  • Dependencies include Node.js, npm, and Playwright.
  • See: docs.stagehand.dev and Quickstart Guide.

Highlighted Details

  • Integrates SOTA computer use models from OpenAI and Anthropic with one line of code.
  • Allows developers to choose between code (Playwright) and natural language for specific actions.
  • Features preview and caching for AI actions to save time and tokens.
  • Built on Playwright for a resilient automation backbone.

Maintenance & Community

  • Active development with a focus on reliability, speed, and cost.
  • Contributions are welcomed; reach out on Slack for alignment.
  • Links: Slack community

Licensing & Compatibility

  • Licensed under the MIT License.
  • Permissive license suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

The framework relies on external LLM API keys and Browserbase credentials, incurring associated costs. While it aims for production readiness, the AI-driven components may still exhibit unpredictability in certain scenarios.

Health Check
Last Commit

23 hours ago

Responsiveness

1 day

Pull Requests (30d)
93
Issues (30d)
20
Star History
631 stars in the last 30 days

Explore Similar Projects

Starred by Travis Fischer Travis Fischer(Founder of Agentic), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
4 more.

open-operator by browserbase

0.4%
2k
Template for building web agents using Browserbase and Stagehand
Created 7 months ago
Updated 3 months ago
Starred by Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
29 more.

browser-use by browser-use

0.6%
70k
SDK for AI agent browser control
Created 10 months ago
Updated 1 day ago
Feedback? Help us improve.