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.
Functions are serverless deployments of your browser automations that can be invoked via API, scheduled to run automatically, or triggered by events.
Functions must have a run() function that serves as the entry point:
handler_function.py
def run(param1: str, param2: int = 10): """ Function docstring explains what it does. Args: param1: Description of param1 param2: Description of param2 (optional) Returns: Description of return value """ # Your automation code result = perform_automation(param1, param2) return result
Key points:
Named run() - this is the entry point
Can accept parameters (passed as variables when invoked)
from notte_sdk import NotteClient# contact_extractor.pydef run(company_url: str): client = NotteClient() with client.Session() as session: session.execute(type="goto", url=company_url) contact_info = session.scrape(instructions="Extract contact email and phone") return contact_info# Now callable from any service# GET /functions/{id}/runs/start?variables={"company_url": "..."}
from notte_sdk import NotteClient# order_processor.pydef run(order_id: str, action: str): client = NotteClient() with client.Session() as session: # Login to admin panel session.execute(type="goto", url="https://admin.example.com") # Process order if action == "fulfill": session.execute(type="click", selector=f"button[data-order='{order_id}'].fulfill") elif action == "refund": session.execute(type="click", selector=f"button[data-order='{order_id}'].refund") return {"order_id": order_id, "action": action, "status": "completed"}# Called via webhook from your e-commerce platform
Define parameters with type hints and descriptions:
bp_clear_parameters.py
def run(target_url: str, max_results: int = 10, timeout_seconds: int = 30): """ Extract data from a website. Args: target_url: The URL to scrape max_results: Maximum number of results to extract timeout_seconds: Session timeout """ pass