Skip to main content
Stagehand is an open source AI browser automation framework that lets you choose what to write in code vs. natural language. By integrating with Notte, you can run Stagehand automations on cloud-hosted browsers with built-in anti-detection, captcha solving, and residential proxies.
This guide is compatible with Stagehand v3. If you’re using an earlier version, refer to the Stagehand migration guide.

Prerequisites

  • A Notte API key (get one here)
  • An LLM API key (e.g., OpenAI)
  • Stagehand v3

Adding Notte to existing Stagehand implementations

If you already have a Stagehand v3 implementation, you can switch to using Notte’s cloud browsers by updating your browser configuration.

1. Install the SDKs

2. Connect Stagehand to a Notte browser

Create a Notte cloud browser session and pass its CDP URL to Stagehand:
stagehand_basic.py
That’s it — Stagehand is now running on a Notte cloud browser with built-in stealth and anti-detection.

Complete example

A production-ready script using Stagehand’s observe, act, and extract on a Notte browser:
stagehand_complete.py
Set the following environment variables in your .env file:

Benefits of using Notte with Stagehand

  • Anti-detection: Notte’s stealth mode keeps your automations undetected
  • Captcha solving: Built-in captcha solving handles CAPTCHAs automatically
  • Residential proxies: Route traffic through residential proxies in 195+ countries
  • Live view: Debug automations in real-time with live view
  • Session replay: Record and review runs with session recordings
  • No local browser: Run automations without installing or maintaining browsers locally

Next steps

Session Configuration

Customize browser settings, proxies, and more

Stealth Mode

Configure anti-detection for your automations

External Providers

Learn about CDP connections and external browsers

Live View

Debug your automations in real-time