Run Browser Use agents on Notte cloud browsers over CDP
AI agent instructions
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.
Browser Use is an open source library that lets an LLM drive a browser. It talks to whatever browser you hand it over the Chrome DevTools Protocol, so pointing it at a Notte session is a one-line change: pass session.cdp_url() as the profile’s cdp_url.
import asynciofrom browser_use import Agent, Browser, BrowserProfile, ChatAnthropicfrom notte_sdk import NotteClientasync def main(): client = NotteClient() with client.Session() as session: # Point Browser Use at the Notte cloud browser over CDP browser = Browser(browser_profile=BrowserProfile(cdp_url=session.cdp_url())) agent = Agent( task="Go to https://example.com and tell me the exact H1 heading text.", llm=ChatAnthropic(model="claude-sonnet-4-5-20250929"), browser=browser, ) result = await agent.run(max_steps=5) print(result.final_result()) await browser.stop()asyncio.run(main())
Set the following environment variables in your .env file:
Browser Use owns the page once it connects. Use session.cdp_url() for the handoff and let Browser Use drive from there, rather than mixing Notte page controls into the same run.