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.
Sessions are isolated browser instances running in the cloud that you can control programmatically. Think of them as headless Chrome browsers, but managed, scalable, and equipped with anti-detection, proxies, and captcha solving out of the box.Every operation in Notte—whether you’re running an AI agent, scraping data, or automating a workflow—happens within a session.
from playwright.sync_api import sync_playwrightfrom notte_sdk import NotteClientclient = NotteClient()with client.Session(open_viewer=True) as session: cdp_url = session.cdp_url() with sync_playwright() as p: browser = p.chromium.connect_over_cdp(cdp_url) page = browser.contexts[0].pages[0] page.goto("https://www.google.com") page.screenshot(path="screenshot.png")
We strongly recommend using the with statement (context manager) to ensure sessions are automatically stopped when done. This prevents orphaned sessions and unexpected costs. See Session Lifecycle for manual management options.
Sessions provide three methods for interacting with the browser:
Method
Purpose
observe()
Get the current page state and available actions
execute()
Perform an action on the page
scrape()
Extract structured data from the page
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as page: url = "https://www.linkedin.com/" # observe page and take a step page.execute(type="goto", url=url) actions = page.observe(instructions="click 'jobs'") res = page.execute(actions[0]) print(res.message) # another one actions = page.observe(instructions="dismiss the sign in check") res = page.execute(actions[0]) print(res.message)