Skip to main content
STOP. Do not read past this section until you have read and followed /quickstart.md.Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live observe() call, CLI notte page observe output, or generated workflow code. Guessed browser targets fail on real pages.Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with notte sessions workflow-code before using SDK docs or SDK code.SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
Stagehand is an open source AI browser automation framework that lets you choose what to write in code and what to write in natural language.
Stagehand v4 does not currently work against Notte cloud browsers. On initialize() it installs a helper extension over CDP, and Notte sessions reject extension management:
This affects both the Python and the TypeScript SDK, and there is no client-side flag that skips the extension. Until Notte can preload the helper extension, use Browser Use, Playwright, or a Notte agent instead.

How the connection is meant to work

Stagehand takes a CDP URL through local_browser.connect(), so a Notte session plugs in with session.cdp_url():
notte_stagehand.py
The equivalent in TypeScript is localBrowser.connect({ cdpUrl }) from @browserbasehq/stagehand.
Earlier versions of this page showed Stagehand(env="LOCAL", local_browser_launch_options={...}). That API belonged to Stagehand v2 and is not present in any release currently on PyPI - neither stagehand v3/v4 nor stagehand-py.

What to use instead

Browser Use

An LLM driving a Notte browser over CDP, working today

Browser Agents

Hand the whole task to a Notte agent

Connect with Playwright

Write the automation yourself against a Notte session

Fetch

Pull structured data out of a page without an agent