Use this file to discover all available pages before exploring further.
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.
Notte can connect to any browser that exposes a Chrome DevTools Protocol (CDP) endpoint. This allows you to use Notte’s features (Agents, Actions, Scraping) with browser infrastructure from providers like Kernel.sh or BrowserBase.
Instead of starting a browser in Notte’s cloud, you can:
Create a browser session with an external provider
Get the CDP WebSocket URL from that provider
Pass the CDP URL to Notte when creating a session
Use Notte’s features on the external browser
from notte_sdk import NotteClientclient = NotteClient()# CDP URL from any external providercdp_url = "ws://external-provider.com:9222/devtools/browser/abc123"# Connect Notte to the external browserwith client.Session(cdp_url=cdp_url) as session: # Use Notte's features on the external browser page = session.page page.goto("https://example.com") # Use Notte's Agent agent = client.Agent(session=session, max_steps=10) result = agent.run(task="Extract all product names")
Kernel.sh is a browser infrastructure platform optimized for AI agents. Here’s how to use it with Notte:
from notte_sdk import NotteClientfrom kernel import Kernel# Initialize clientsclient = NotteClient()kernel = Kernel()# Create browser on Kernelkernel_browser = kernel.browsers.create()try: # Connect Notte to Kernel's browser with client.Session(cdp_url=kernel_browser.cdp_ws_url) as session: # Use Notte's features page = session.page page.goto("https://example.com") # Run an Agent agent = client.Agent(session=session, max_steps=10) result = agent.run(task="Find the contact email") print(f"Result: {result.answer}")finally: # Clean up Kernel browser kernel.browsers.delete_by_id(kernel_browser.session_id)
Run the same automation across different providers:
from notte_sdk import NotteClientfrom kernel import Kernelfrom typing import Literalclient = NotteClient()def run_automation(provider: Literal["notte", "kernel"], task: str): """Run automation on different browser providers""" if provider == "notte": # Use Notte's browser with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task=task) return result elif provider == "kernel": # Use Kernel's browser kernel = Kernel() kernel_browser = kernel.browsers.create() try: with client.Session(cdp_url=kernel_browser.cdp_ws_url) as session: agent = client.Agent(session=session) result = agent.run(task=task) return result finally: kernel.browsers.delete_by_id(kernel_browser.session_id)# Run on Notte's infrastructureresult1 = run_automation("notte", "Get the latest news from example.com")print(f"Notte result: {result1.answer}")# Run on Kernel's infrastructureresult2 = run_automation("kernel", "Get the latest news from example.com")print(f"Kernel result: {result2.answer}")
Some providers require authentication in the CDP URL:
external_cdp_auth.py
from notte_sdk import NotteClientclient = NotteClient()# CDP URL with authenticationcdp_url = "wss://user:password@provider.com:9222/devtools/browser/abc123"with client.Session(cdp_url=cdp_url) as session: # Your automation pass
passprovider = Provider()client = NotteClient()try: # Create external browser external_browser = provider.create() # Use with Notte with client.Session(cdp_url=external_browser.cdp_url) as session: # Your automation
from notte_sdk import NotteClientclient = NotteClient()cdp_url = "wss://provider.com:9222/devtools/browser/abc123"try: with client.Session(cdp_url=cdp_url) as session: # Your automation passexcept Exception as e: print(f"Automation failed: {e}") # Implement retry logic or fallback