Skip to main content
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.

Agent Replay

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:

What’s Included

Agent replays capture:
  • Visual recording of every page the agent visited
  • Actions taken by the agent (clicks, fills, navigations)
  • Page transitions and loading states
  • Element highlights showing what the agent interacted with
  • Timestamps for each action

Viewing Replays

In Jupyter Notebook

Display the replay inline:
view_in_notebook.py

Save to File

Save for later viewing or sharing:
save_to_file.py

In Browser

Use the Notte Console to view replays:
view_in_browser.py

Debugging Workflow

1. Run Agent

Execute your agent task:
run_agent.py

2. Check If Failed

Identify failures:
check_if_failed.py

3. Inspect Steps

Review what the agent did:

4. Watch Replay

See the visual execution:
watch_replay.py

5. Fix and Retry

Adjust based on findings:

Common Issues

Agent Can’t Find Element

Symptoms:
  • Agent fails with “Element not found”
  • Replay shows element exists but wasn’t clicked
Debug:
Fix:
fix_missing_element.py

Agent Takes Wrong Action

Symptoms:
  • Agent clicks wrong button
  • Agent fills wrong form field
Debug:
Fix:

Agent Exceeds Max Steps

Symptoms:
  • Agent stops before completing task
  • len(result.steps) == max_steps
Debug:
Fix:

Advanced Debugging

Step-by-Step Analysis

Inspect each step in detail:
step_by_step_analysis.py

Comparing Runs

Compare successful vs failed runs:

Agent Status During Execution

Monitor agent in real-time:
monitor_status.py

Best Practices

1. Always Review Failed Agents

Don’t ignore failures - watch the replay:
review_failed_agents.py

2. Save Replays for Production Issues

Keep replays of production failures:
save_production_replays.py

3. Use Replays for QA

Verify agent behavior before deploying:
replays_for_qa.py

4. Share Replays with Team

Save and share for collaboration:
share_with_team.py

Limitations

Replays are currently:
  • ✅ Available for all completed agents
  • ✅ Full video recording of execution
  • ✅ Include element highlights
  • ⚠️ Generated after completion (not real-time)
  • ⚠️ May be large files for long runs

Next Steps

Lifecycle

Understand agent execution

Configuration

Optimize agent settings

Best Practices

Build reliable agents

Live View

Watch sessions in real-time