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.
Debug agent executions with MP4 replays that show exactly what the agent saw and did during its run.
Get a visual replay of the agent’s execution. The session.replay() method returns a
ReplayResponse with a presigned URL you can use to download the MP4 file:
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task="Navigate and extract data")# Get MP4 replay (returns presigned URL)replay = session.replay()# Download to filereplay.download("agent_run.mp4")
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task="Complete task") for i, step in enumerate(result.steps): print(f"Step {i + 1}: {step['action']}") print(f" Success: {step['success']}") if not step["success"]: print(f" Error: {step['message']}")
with client.Session() as session: agent = client.Agent(session=session) agent.run(task="Complete task")replay = session.replay()replay.download("debug_replay.mp4")# Watch where it failed# Identify if element selectors were wrong# Check if page loaded correctly
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: # Maybe increase max_steps agent = client.Agent(session=session, max_steps=25) # Or adjust the task result = agent.run(task="Click the 'View Pricing' button in the main navigation")
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task="Complete task")replay = session.replay()replay.download("missing_element.mp4")# Watch replay and check:# - Did page finish loading?# - Is element visible/in viewport?# - Is element covered by another element?
Fix:
fix_missing_element.py
agent = client.Agent(session=session)# Be more specific in tasktask = "Wait for the page to load, then click the blue 'Submit' button at the bottom"# Or use session actions firstsession.execute(type="goto", url="https://example.com")time.sleep(2) # Wait for loadresult = agent.run(task="Click submit button")
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task="Fill the email field") # Check what agent saw for step in result.steps: print(f"Action: {step['action']}") print(f"Reasoning: {step.get('reasoning', 'N/A')}")
Fix:
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: # Be more specific task = "Fill the email input field in the signup form with user@example.com" # Or disable vision if causing confusion agent = client.Agent(session=session, use_vision=False)
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task="Complete task") print(f"Steps taken: {len(result.steps)}") print(f"Max steps: {agent.request.max_steps}")replay = session.replay()replay.download("debug_replay.mp4") # See where it got stuck
Fix:
from notte_sdk import NotteClientclient = NotteClient()with client.Session() as session: # Increase max_steps agent = client.Agent(session=session, max_steps=30) # Or break task into smaller steps result1 = agent.run(task="Navigate to products page") result2 = agent.run(task="Search for laptops")
with client.Session() as session: agent = client.Agent(session=session) agent.start(task="Long running task") while True: status = agent.status() if status.status == "closed": break print(f"Steps: {len(status.steps)}") time.sleep(5)# Get replay after completion# replay = session.replay()# replay.download("replay.mp4")
with client.Session() as session: agent = client.Agent(session=session) result = agent.run(task="Critical task")if not result.success: replay = session.replay() replay.download(f"failure_{agent.agent_id}.mp4") print(f"Saved replay for debugging: failure_{agent.agent_id}.mp4")
with client.Session() as session: agent = client.Agent(session=session) # Test run result = agent.run(task="Test checkout flow")# Review replay before productionreplay = session.replay()replay.download("qa_replay.mp4")# Verify:# - All steps completed correctly# - No unexpected behavior# - Performance is acceptable