Skip to content

Commit 13c66dc

Browse files
authored
[docs] add banner indicating v2 vs v3 toggle (#1375)
# why Users don't know about the v2/v3 version toggle in the docs navigation. # what changed Added a banner at the top of the v3 docs pages to help users easily discover Stagehand Python (v2). # test plan n/a <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added a reusable banner to the top of all v3 docs pages to highlight the Stagehand Python (v2) option. Improves discoverability of the v2/v3 toggle and reduces confusion. - **New Features** - Added V3Banner MDX snippet linking to “/v2/first-steps/introduction”. - Imported and rendered the banner across v3 Basics, Best Practices, Configuration, First Steps, Integrations, Migrations, and References pages. - Minor metadata/formatting updates in v2 docs (e.g., User Data frontmatter) for consistency. <sup>Written for commit 515a13d. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent 1ebc7e1 commit 13c66dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+222
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export const V3Banner = () => (
2+
<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">
3+
<span className="text-zinc-400">
4+
🐍&nbsp;&nbsp;Looking for <strong className="text-zinc-200">Stagehand in Python</strong>?
5+
</span>
6+
<a
7+
href="/v2/first-steps/introduction"
8+
className="text-zinc-400 hover:text-zinc-200 transition-colors no-underline text-xs"
9+
>
10+
Switch to v2 →
11+
</a>
12+
</div>
13+
);

packages/docs/v2/best-practices/user-data.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: User Data Directory
3+
sidebarTitle: User Data
4+
description: Persist browser data between sessions
5+
---
16

27
### User Data Directory
38

packages/docs/v3/basics/act.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Act
33
description: 'Interact with a web page'
44
---
5+
import { V3Banner } from '/snippets/v3-banner.mdx';
6+
7+
<V3Banner />
8+
59

610
## What is `act()`?
711
``` typescript

packages/docs/v3/basics/agent.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Agent
33
description: 'Automate complex workflows with AI powered browser agents'
44
---
5+
import { V3Banner } from '/snippets/v3-banner.mdx';
6+
7+
<V3Banner />
8+
59

610
## What is `agent()?`
711

packages/docs/v3/basics/evals.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Evaluations & Metrics
33
sidebarTitle: Evals
44
description: Monitor performance, optimize costs, and evaluate LLM effectiveness
55
---
6+
import { V3Banner } from '/snippets/v3-banner.mdx';
7+
8+
<V3Banner />
9+
610

711
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.
812

packages/docs/v3/basics/extract.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Extract
33
description: Extract structured data from a webpage
44
---
5+
import { V3Banner } from '/snippets/v3-banner.mdx';
6+
7+
<V3Banner />
8+
59

610
## What is `extract()`?
711

packages/docs/v3/basics/observe.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Observe
33
sidebarTitle: Observe
44
description: 'Discover and plan executable actions on any web page'
55
---
6+
import { V3Banner } from '/snippets/v3-banner.mdx';
7+
8+
<V3Banner />
9+
610

711
## What is `observe()`?
812

packages/docs/v3/best-practices/agent-fallbacks.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Agent Fallbacks
33
description: "A failsafe when unexpected page changes add extra steps"
44
---
5+
import { V3Banner } from '/snippets/v3-banner.mdx';
6+
7+
<V3Banner />
8+
59

610
## When to use
711

packages/docs/v3/best-practices/caching.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Caching Actions
33
description: Cache actions automatically to reduce costs and improve performance
44
---
5+
import { V3Banner } from '/snippets/v3-banner.mdx';
6+
7+
<V3Banner />
8+
59

610
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.
711

packages/docs/v3/best-practices/computer-use.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Computer Use Agents
33
description: Incorporate Computer Use APIs from Google, Anthropic, and OpenAI with one line of code in Stagehand.
44
---
5+
import { V3Banner } from '/snippets/v3-banner.mdx';
6+
7+
<V3Banner />
8+
59

610
## What is a Computer Use Agent?
711

0 commit comments

Comments
 (0)