Local CDP

Notte sessions support Chrome DevTools Protocol (CDP) connections. This allows you to control the browser session programmatically through Playwright’s CDP integration, enabling advanced browser automation and debugging capabilities.

cdp_playwright.py
from patchright.sync_api import sync_playwright
from notte_sdk import NotteClient

notte = NotteClient()
with notte.Session(proxies=False) as session:
    # get cdp url
    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")
        screenshot = page.screenshot(path="screenshot.png")
        assert screenshot is not None

Use external session provider via CDP

You can also use external headless browser providers via CDP. This allows you to benefif from Notte’s Agentic capabilities from any CDP-compatible browser:

from notte_sdk import NotteClient

notte = NotteClient()
cdp_url = "wss://your-external-cdp-url"

with notte.Session(cdp_url=cdp_url) as session:
    agent = notte.Agent(session=session)
    agent.run(task="extract pricing plans from https://www.notte.cc/")

Local CDP

Notte sessions support Chrome DevTools Protocol (CDP) connections. This allows you to control the browser session programmatically through Playwright’s CDP integration, enabling advanced browser automation and debugging capabilities.

cdp_playwright.py
from patchright.sync_api import sync_playwright
from notte_sdk import NotteClient

notte = NotteClient()
with notte.Session(proxies=False) as session:
    # get cdp url
    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")
        screenshot = page.screenshot(path="screenshot.png")
        assert screenshot is not None

Use external session provider via CDP

You can also use external headless browser providers via CDP. This allows you to benefif from Notte’s Agentic capabilities from any CDP-compatible browser:

from notte_sdk import NotteClient

notte = NotteClient()
cdp_url = "wss://your-external-cdp-url"

with notte.Session(cdp_url=cdp_url) as session:
    agent = notte.Agent(session=session)
    agent.run(task="extract pricing plans from https://www.notte.cc/")