Skip to main content
A ready-to-run example is available here!
The browser session recording feature allows you to capture your agent’s browser interactions and replay them later using rrweb. This is useful for debugging, auditing, and understanding how your agent interacts with web pages.

How It Works

The recording feature uses rrweb to capture DOM mutations, mouse movements, scrolling, and other browser events. The recordings are saved as JSON files that can be replayed using rrweb-player or the online viewer. The ready-to-run example demonstrates:
  1. Starting a recording: Use browser_start_recording to begin capturing browser events
  2. Browsing and interacting: Navigate to websites and perform actions while recording
  3. Stopping the recording: Use browser_stop_recording to stop and save the recording
Recording files are written under .agent_tmp/browser_observations/recording-<timestamp>/ relative to the browser tool process working directory. Events are flushed periodically, and stopping the recording saves any remaining events. This location is separate from the conversation’s persistence_dir. For browser setup and tool configuration, see Browser Use.

Replaying Recordings

After recording a session, you can replay it using:
  • rrweb-player: A standalone player component - GitHub
  • Online viewer: Upload your recording at rrweb.io/demo

Ready-to-run Example

examples/01_standalone_sdk/38_browser_session_recording.py
You can run the example code as-is.
The model name should follow the LiteLLM convention: provider/model_name (e.g., anthropic/claude-sonnet-4-5-20250929, openai/gpt-4o). The LLM_API_KEY should be the API key for your chosen provider.
ChatGPT Plus/Pro subscribers: You can use LLM.subscription_login() to authenticate with your ChatGPT account and access Codex models without consuming API credits. See the LLM Subscriptions guide for details.