Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/docs/snippets/v3-banner.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const V3Banner = () => (
<div className="mb-5 flex items-center justify-between gap-4 rounded-md border border-zinc-700/50 bg-zinc-800/50 px-4 py-3 text-sm">
<span className="text-zinc-400">
🐍&nbsp;&nbsp;Looking for <strong className="text-zinc-200">Stagehand in Python</strong>?
</span>
<a
href="/v2/first-steps/introduction"
className="text-zinc-400 hover:text-zinc-200 transition-colors no-underline text-xs"
>
Switch to v2 →
</a>
</div>
);
5 changes: 5 additions & 0 deletions packages/docs/v2/best-practices/user-data.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: User Data Directory
sidebarTitle: User Data
description: Persist browser data between sessions
---

### User Data Directory

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/basics/act.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Act
description: 'Interact with a web page'
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## What is `act()`?
``` typescript
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/basics/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Agent
description: 'Automate complex workflows with AI powered browser agents'
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## What is `agent()?`

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/basics/evals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Evaluations & Metrics
sidebarTitle: Evals
description: Monitor performance, optimize costs, and evaluate LLM effectiveness
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Evaluations help you understand how well your automation performs, which models work best for your use cases, and how to optimize for cost and reliability. This guide covers both monitoring your own workflows and running comprehensive evaluations.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/basics/extract.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Extract
description: Extract structured data from a webpage
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## What is `extract()`?

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/basics/observe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Observe
sidebarTitle: Observe
description: 'Discover and plan executable actions on any web page'
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## What is `observe()`?

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/agent-fallbacks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Agent Fallbacks
description: "A failsafe when unexpected page changes add extra steps"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## When to use

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Caching Actions
description: Cache actions automatically to reduce costs and improve performance
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Stagehand provides built-in action caching to reduce LLM inference calls and improve performance. Simply specify a `cacheDir` when initializing Stagehand, and actions are automatically cached and reused across runs.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/computer-use.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Computer Use Agents
description: Incorporate Computer Use APIs from Google, Anthropic, and OpenAI with one line of code in Stagehand.
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## What is a Computer Use Agent?

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/cost-optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Cost Optimization
sidebarTitle: Cost Optimization
description: Minimize costs while maintaining automation performance
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Cost optimization in Stagehand involves balancing LLM inference costs and browser infrastructure costs. This guide provides practical strategies to reduce your automation expenses.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: 'Deploying Stagehand'
description: 'Deploy your AI agents and automations to the cloud'
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


<Tip>
**🌟 Preview: Browser Functions** - Deploy your web automation code directly on Browserbase with browser functions. Scale your `act()` automations in the cloud with zero infrastructure setup. Reach out to hello@browserbase.com to get beta access.
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/deterministic-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Deterministic Agent Scripts
sidebarTitle: Deterministic Agent
description: Use auto-caching to convert agent workflows into fast, deterministic scripts
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Agent workflows are powerful for exploring and automating complex tasks, but they can be slow and non-deterministic. This guide shows you how to use Stagehand's built-in auto-caching to convert agent-discovered workflows into fast, deterministic scripts that run 10-100x faster.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: History Tracking
sidebarTitle: History Tracking
description: Track and analyze Stagehand operations with the history API
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


The history API captures every Stagehand operation for debugging, auditing, and workflow analysis.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/mcp-integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: "MCP Integrations"
description: "Using Model Context Protocol (MCP) integrations to enhance agent capabilities"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## What are MCP Integrations?

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/prompting-best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Prompting Best Practices
description: "Write effective prompts for reliable Stagehand automation"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Good prompts make Stagehand reliable. Bad prompts cause failures. Here's how to write prompts that work consistently.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/speed-optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Speed Optimization
sidebarTitle: Speed Optimization
description: Optimize Stagehand performance for faster automation and reduced latency
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Stagehand performance depends on several factors: DOM processing speed, LLM inference time, browser operations, and network latency. This guide provides proven strategies to maximize automation speed.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/usecase-observe.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
sidebarTitle: Use Cases
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Real-World Use Cases

Expand Down
8 changes: 8 additions & 0 deletions packages/docs/v3/best-practices/user-data.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
title: User Data Directory
sidebarTitle: User Data
description: Persist browser data between sessions
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />

### User Data Directory

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/best-practices/using-multiple-tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: 'Using Multiple Tabs'
description: 'Act on multiple tabs with Stagehand'
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Many modern web applications open new tabs when users click certain buttons or links. Without proper multitab support, automation scripts break when expected content appears in a new tab rather than the current one. Stagehand's multitab capabilities ensure your automations work seamlessly across multitab workflows.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/configuration/browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Browser
sidebarTitle: Browser
description: Configure Stagehand on Browserbase or locally
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Stagehand supports two primary environments:

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/configuration/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Logging
sidebarTitle: Logging
description: Set up logging, debugging, and error tracking for Stagehand workflows
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Stagehand provides comprehensive logging capabilities to help you debug automation workflows, track execution, and diagnose issues. Configure logging levels, structured output, and debugging tools for both development and production environments.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/configuration/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Models
sidebarTitle: Models
description: Use any LLM model with Stagehand for optimal performance
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Understand web pages, plan actions, and interact with complex interfaces with Google, OpenAI, Anthropic, xAI, DeepSeek, Perplexity, Azure, Ollama, or any other LLM model from [the Vercel AI SDK](https://sdk.vercel.ai/providers).

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/configuration/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Observability
sidebarTitle: Observability
description: Track Stagehand automation with session visibility and analytics
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Stagehand provides powerful observability features to help you monitor, track performance, and analyze your browser automation workflows. Focus on session monitoring, resource usage, and operational insights for both Browserbase and local environments.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/first-steps/ai-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: AI Rules
description: Using AI to write Stagehand code faster, and better.
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


You're likely using AI to write code, and there's a **right and wrong way to do it.** This page is a collection of rules, configs, and copy‑paste snippets to allow your AI agents/assistants to write performant, Stagehand code as fast as possible.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/first-steps/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Installation
description: Integrate Stagehand into an existing project.
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Install Stagehand in your current app with the TypeScript SDK.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/first-steps/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Introducing Stagehand
sidebarTitle: Introduction
description: Developers use Stagehand to reliably automate the web.
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


Stagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/first-steps/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Quickstart
description: 'Stagehand allows you to build web automations with natural language and code.'
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


If this is your **first time using Stagehand**, you should try [Director](https://director.ai) first. It's an agent that allows you to build Stagehand workflows using natural language. You can also try Stagehand using our [MCP server](/integrations/mcp/introduction) .

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/crew-ai/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "Use CrewAI to Automate Browser Tasks"
sidebarTitle: Configuration
description: "Create intelligent agents that can interact with websites and automate browser tasks using natural language instructions"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


This guide walks you through setting up CrewAI with Browserbase to create agents that can perform web automation tasks using natural language instructions.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/crew-ai/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "CrewAI Introduction"
sidebarTitle: Introduction
description: "Automate browser tasks using natural language instructions with CrewAI"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Overview

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/langchain/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "LangChain JS Configuration"
sidebarTitle: Configuration
description: "Set up Stagehand with LangChain JS to create intelligent web automation agents"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


This guide walks you through integrating Stagehand with LangChain JS to build powerful web automation workflows using natural language instructions.

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/langchain/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "Langchain JS Introduction"
sidebarTitle: Introduction
description: "Integrate Stagehand with Langchain JS for intelligent web automation"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Overview

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/mcp/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "Browserbase MCP Server Configuration"
sidebarTitle: "Configuration"
description: "Configure your browser automation with command-line flags, environment variables, and advanced options"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Configuration Overview

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/mcp/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "Browserbase MCP Server"
sidebarTitle: "Introduction"
description: "AI-powered browser automation through Model Context Protocol integration with Stagehand"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Overview

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/mcp/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "Browserbase MCP Server Setup"
sidebarTitle: "Setup"
description: "Add the Browserbase MCP Server to Claude"
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Quick Installation

Expand Down
4 changes: 4 additions & 0 deletions packages/docs/v3/integrations/mcp/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: "Browserbase MCP Server Tools"
sidebarTitle: "Tools"
description: "This guide covers the specialized tools available in the Browserbase MCP server for browser automation and interaction."
---
import { V3Banner } from '/snippets/v3-banner.mdx';

<V3Banner />


## Overview

Expand Down
Loading