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.
File Storage provides a cloud bucket for uploading files to use in your automations and downloading files that agents retrieve from websites.
from notte_sdk import NotteClientclient = NotteClient()storage = client.FileStorage()# Upload a file before the sessionstorage.upload("document.pdf")# Create session with storage attachedwith client.Session(storage=storage) as session: agent = client.Agent(session=session) result = agent.run( task="Upload document.pdf to the portal and download the receipt", url="https://example.com/upload" )# Download files the agent retrievedfor file in storage.list_downloaded_files(): storage.download(file_name=file.name, local_dir="./downloads")
Upload files from your local machine to make them available in sessions:
uploading_files.py
from notte_sdk import NotteClientclient = NotteClient()storage = client.FileStorage()# Upload a file (uses the original filename)storage.upload("report.pdf")# Upload with a custom namestorage.upload("report.pdf", upload_file_name="quarterly_report.pdf")# List uploaded filesfiles = storage.list_uploaded_files()print(f"Uploaded: {files}")
Download files that agents retrieved from websites:
downloading_files.py
from notte_sdk import NotteClientclient = NotteClient()storage = client.FileStorage()with client.Session(storage=storage) as session: agent = client.Agent(session=session) agent.run(task="Download the invoice from the account page")# List downloaded filesdownloaded = storage.list_downloaded_files()print(f"Downloaded: {downloaded}")# Download to local directoryfor file in downloaded: storage.download(file_name=file.name, local_dir="./invoices")
Agents can interact with files on websites when storage is attached:
using_with_agents.py
from notte_sdk import NotteClientclient = NotteClient()storage = client.FileStorage()# Upload files for the agent to usestorage.upload("contract.pdf")storage.upload("signature.png")with client.Session(storage=storage) as session: agent = client.Agent(session=session, max_steps=15) result = agent.run( task=""" 1. Upload contract.pdf to the document portal 2. Add signature.png to the signature field 3. Submit the form 4. Download the signed confirmation """, url="https://example.com/documents", )# Get the confirmation the agent downloadedfor file in storage.list_downloaded_files(): storage.download(file_name=file.name, local_dir="./signed")
Always create and attach storage before starting the session:
attach_before_starting.py
from notte_sdk import NotteClientclient = NotteClient()# Correctstorage = client.FileStorage()storage.upload("file.pdf")with client.Session(storage=storage) as session: # Storage is available pass
Always check for downloaded files after the session ends:
check_downloads.py
from notte_sdk import NotteClientclient = NotteClient()storage = client.FileStorage()with client.Session(storage=storage) as session: agent = client.Agent(session=session) agent.run(task="Download all invoices")# Check what was downloadedfiles = storage.list_downloaded_files()if not files: print("No files were downloaded")else: for f in files: _ = storage.download(file_name=f.name, local_dir="./invoices")