Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Stagehand

$ stagehand Official Med Risk
Browserbase · Browser & Web · MIT · macos / linux / windows

Stagehand (browserbase/stagehand) is Browserbase's AI-native browser automation framework and CLI/MCP toolkit built around deterministic observe, act, and schema-validated extract primitives. Ships official SKILL.md guidance for Claude Code and Codex along with stagehand init and create-browser-app.

FCRS-1.0 Score
89 /100
Good
Medium Confidence
Zero-Friction Install
npm install @browserbasehq/stagehand
CLI vs MCP Decision Hybrid (CLI + MCP)

Combines CLI scaffolding and official SKILL.md agent workflows with a stdio MCP server adapter for persistent multi-step browser sessions.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
✓ Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Ships official SKILL.md, schema-typed extract JSON outputs, observe/act primitives, and stdio MCP integration.

  • Official SKILL.md, Zod-validated extract, and stagehand init
Trust & Safety 20 / 25

Separates element discovery (observe) from execution (act) and reads API keys cleanly from environment variables.

  • Env-based credentials and explicit observe before act pattern
Setup & Portability 13 / 15

Available across TypeScript (npm), Python (pip), and npx create-browser-app with local or cloud Chromium.

  • Multi-language npm/PyPI packages and npx create-browser-app
Utility & Efficiency 14 / 15

Self-healing selectors + structured schema extraction dramatically cut fragile Playwright maintenance.

  • Schema-first extract and resilient act/observe primitives
Maintenance & Lineage 10 / 10

Official Browserbase flagship repository (browserbase/stagehand, 26k+ stars) under MIT license.

  • Official browserbase/stagehand repository
Docs & Verifiability 9 / 10

Thorough docs at docs.stagehand.dev plus bundled SKILL.md for Claude Code and Codex.

  • Official documentation at docs.stagehand.dev and SKILL.md

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Reads optional BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, and model provider keys (OPENAI_API_KEY / ANTHROPIC_API_KEY) from environment variables.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source SDK/CLI; local Chromium is free while Browserbase cloud sessions and LLM calls are usage-billed.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# stagehand Agent Rules
- Prefer `observe` + schema-validated `extract` (Zod/Pydantic) before running `act` mutations.
- Keep `BROWSERBASE_API_KEY` and LLM keys in `.env` or environment variables—never hardcode them in scripts.
- Close browser sessions cleanly after extraction finishes.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scaffold a Stagehand browser automation project
npx create-browser-app --help

Inspects CLI scaffolding options for launching a new Stagehand extraction script.

Controlled Writes & Previews

Initialize Stagehand configuration in a workspace
stagehand init

Generates Stagehand config files and environment templates for local or Browserbase runs.

Strengths for Agents

  • + Ships official SKILL.md alongside schema-enforced extract JSON outputs.
  • + Supports both local Chromium and managed Browserbase cloud browsers.
  • + First-class TypeScript and Python tooling with npx create-browser-app.

Caveats & Pitfalls

  • ! Requires an LLM API key for AI-driven act/observe/extract steps.
  • ! Full automation scripts use SDK calls or the stdio MCP adapter rather than a single standalone query binary.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI