Skip to main content
Notte automatically records every action in your browser sessions, allowing you to download video replays for debugging and analysis.

Quick Start

Get a recording after your session ends:
from notte_sdk import NotteClient

client = NotteClient()

with client.Session() as session:
    session.execute(type="goto", url="https://example.com")
    session.execute(type="click", selector="button.submit")
    session.execute(type="fill", selector="input[name='email']", value="user@example.com")
    # All actions automatically recorded

# Get replay after session ends
replay = session.replay()
replay.save("session_recording.mp4")

What Gets Recorded

Session recordings capture:
  • Page navigation - All page loads and URL changes
  • User interactions - Clicks, fills, scrolls, key presses
  • DOM changes - Dynamic content updates
  • Visual state - What the browser displays
  • Timing - Real-time playback speed

Session Replays

Download as MP4

from notte_sdk import NotteClient

client = NotteClient()

with client.Session() as session:
    session.execute(type="goto", url="https://example.com")
    session.execute(type="click", selector="a.link")

# Download recording
replay = session.replay()

# Save to file
replay.save("my_automation.mp4")

# Or get raw bytes
video_bytes = replay.bytes()

Replay by Session ID

Get a replay for any session using its ID:
from notte_sdk import NotteClient

client = NotteClient()

# Get replay for a specific session
replay = client.sessions.replay(session_id="your-session-id")
replay.save("session_replay.mp4")

Agent Replays

Agents have their own replay method for convenience:
from notte_sdk import NotteClient

client = NotteClient()

with client.Session() as session:
    agent = client.Agent(session=session, max_steps=10)
    result = agent.run(task="Find the contact email on example.com")

# Get agent replay directly
replay = agent.replay()
replay.save("agent_run.mp4")
You can also get the replay from the session:
# Alternative: get from session
replay = session.replay()
replay.save("agent_run.mp4")

Debugging Failed Runs

Use recordings to understand what went wrong:
from notte_sdk import NotteClient

client = NotteClient()

session_id = None

try:
    with client.Session() as session:
        session_id = session.session_id
        session.execute(type="goto", url="https://example.com")
        session.execute(type="click", selector="button.sometimes-missing")

except Exception as e:
    print(f"Automation failed: {e}")

    if session_id:
        # Get recording to see what happened
        replay = client.sessions.replay(session_id=session_id)
        replay.save(f"failed_{session_id}.mp4")
        print("Replay saved for analysis")

Best Practices

1. Name Recordings Meaningfully

Use descriptive filenames:
from datetime import datetime

timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
replay.save(f"login_test_{session.session_id}_{timestamp}.mp4")

2. Record Only on Failures

For production, save recordings only when something goes wrong:
try:
    with client.Session() as session:
        session.execute(type="goto", url="https://example.com")
        # ... automation ...
except Exception as e:
    replay = session.replay()
    replay.save(f"error_{session.session_id}.mp4")
    raise

3. Clean Up Old Recordings

Remove old recordings to save disk space:
import time
from pathlib import Path

def cleanup_old_recordings(directory: str, days: int = 7):
    """Remove recordings older than specified days."""
    cutoff = time.time() - (days * 86400)

    for recording in Path(directory).glob("*.mp4"):
        if recording.stat().st_mtime < cutoff:
            recording.unlink()
            print(f"Deleted: {recording}")

cleanup_old_recordings("recordings/", days=7)

Recording Limitations

What’s Recorded

  • All page interactions
  • Visual state changes
  • Navigation and reloads
  • Dynamic content

What’s NOT Recorded

  • Audio
  • Network request details (use CDP for this)
  • Console logs (use logging)
  • Session state before first action

Storage

Recordings are:
  • Stored temporarily on Notte’s servers
  • Available after session ends
  • Retained for 24 hours
  • Downloadable as MP4
Recordings are deleted after 24 hours. Download them promptly if needed for later analysis.

Next Steps