Stagehand logo

Stagehand

Freemium
Visit

Stagehand is an SDK for building browser agents with Playwright-style APIs, natural-language actions, structured extraction, and self-healing behavior. It supports TypeScript, Python, and Go for agents that need to operate web pages with browser-level control.

What is Stagehand?

Stagehand is an open-source SDK for building browser agents. It provides Playwright-style browser control alongside natural-language primitives such as act, observe, and extract, so an agent can navigate pages, carry out tasks, and return structured information.

The SDK is available for TypeScript, Python, and Go. Its documented workflow combines normal browser operations such as goto, click, locator, and screenshot with agent-directed actions and schema-based extraction. Stagehand is intended for browser automation where model flexibility needs to be combined with control over the page and the browser runtime.

What can Stagehand do?

Playwright-style browser API

Use familiar methods including `goto`, `click`, `locator`, and `screenshot`, making the SDK recognizable to developers who already work with Playwright-style automation.

Natural-language browser actions

The `act`, `observe`, and `extract` primitives let agents describe actions and page observations in natural language rather than relying only on fixed selectors.

Self-healing actions

When a site changes, Stagehand can detect selector changes and refresh how an action is performed, helping existing browser tasks recover from page updates.

Structured data extraction

Extract page information against a schema, as shown in the TypeScript example that returns story titles and point totals as structured results.

Agent-focused browser context

The SDK uses accessibility-tree trimming to provide agents with more targeted page context and reduce unnecessary information during browser interaction.

Support for complex browser features

The site lists support for nested iframes, closed Shadow DOM, WebMCP, clipboard operations, batched commands, and OpenTelemetry support.

Use Cases

“Natural-language page automation”

Build agents that navigate a website and carry out a stated task, such as upvoting the top story on a news site, while retaining direct browser control in code.

“Structured web research”

Collect selected page data into a defined schema—for example, extracting the top five stories and their point totals from a news page.

“Order-status workflows”

Automate browser interactions for tasks such as checking an order’s shipping status, an example highlighted in the project’s introductory material.

“Browser-agent benchmarking”

Use the project’s evaluation work as a reference point for assessing browser agents by accuracy, speed, and cost, or run evaluations with a chosen model, harness, and benchmark.

Frequently Asked Questions

What is Stagehand used for?

Stagehand is used to build browser agents that navigate web pages, perform actions described in natural language, observe page content, and extract structured data.

Which programming languages does Stagehand support?

The site presents Stagehand for TypeScript, Python, and Go. The documented quickstart uses TypeScript.

How does a typical Stagehand workflow work?

A typical workflow creates a Stagehand instance, gets the active page, navigates with a browser method such as `goto`, performs an action with `act`, extracts data with a schema, and then closes the session.

Can Stagehand return structured data?

Yes. The documented example uses `extract` with a schema and returns typed story data, including titles and points.

What browser structures and capabilities are supported?

The site lists support for nested or out-of-process iframes, closed Shadow DOM, WebMCP, clipboard operations, batched commands, and OpenTelemetry support.

Quick Facts

Category
Developer Tool
Product type
Open-source browser-agent SDK
Languages
TypeScript, Python, and Go
Core primitives
Act, Observe, and Extract
Example output
Schema-based structured page data
Source domain
stagehand.dev

Stagehand Alternatives

Agent Development Kit (ADK) logo

Agent Development Kit (ADK)

adk.dev

Agent Development Kit (ADK) is an open-source framework for building, evaluating, and deploying conversational and non-conversational AI agents. It supports multi-agent systems, tools, structured workflows, and production runtimes across Python, TypeScript, Go, Java, and Kotlin.

Totalum logo

Totalum

totalum.app

Totalum is an AI app builder that turns natural-language descriptions into full-stack web applications with databases, authentication, hosting, and deployment. It supports browser-based creation as well as API and MCP workflows for developers and coding agents.

Kopai logo

Kopai

usekopai.com

Kopai is a hosted platform for building, running, publishing, and monetizing domain-specific AI agents. It supports internal team agents, marketplace listings, and deployment to a creator’s own site through live APIs.

Microsoft Agent Framework logo

Microsoft Agent Framework

learn.microsoft.com

Microsoft Agent Framework is a developer framework for building, orchestrating, and deploying AI agents and multi-agent workflows. It supports implementations in Python and .NET.

OpenAI Agents SDK TypeScript logo

OpenAI Agents SDK TypeScript

openai.github.io

A TypeScript SDK for developers building text, sandbox, and realtime voice agents.

Google AI Studio logo

Google AI Studio

aistudio.google.com

Google AI Studio is a browser-based development environment for experimenting with Google’s generative models and moving prompts into applications through the Gemini API. It supports developers building text, image, video, audio, and agent experiences.