Skip to main content
Recordings capture the browser to a replayable video. They cover all tabs, follow whichever one is in the foreground, and include everything an AI task does. Use them for audit trails, debugging agent behavior, or showing users what happened after the fact.

Record a session

A recording stops when you call stop(), when it reaches maxDurationSeconds (default and maximum: 600 seconds), or automatically after 3 minutes with no on-screen activity.

Playback

A completed recording is an HLS video. playlistUrl points to its playlist, and markers holds chapters for tab switches (tab_switch) and AI runs (run) with their timestamps. A player can use the markers to jump straight to a specific run.
Unlike live view URLs, the playlist URL is not tokenized. Fetching it requires your Box API key, like any other API call. Recordings are retained for 14 days.
The easiest way to watch a recording is the Browser tab of your box in the Upstash Console. To play recordings in your own product, keep the API key on your server: proxy the playlist and segment requests through your backend, attach the X-Box-Api-Key header there, and feed the proxied playlist to an HLS player such as hls.js. Do not ship the key to end users.

Find recordings later

Recordings belong to the box and can be discovered again after a restart or from another process:
Each recording reports its status (recording, completed, failed, or deleted), timing (startedAt, endedAt, durationMs), size, why it stopped (stoppedReason), and its expiry time.
recording.stop() is safe to call on a stale handle. If that recording already ended, for example because it auto-stopped and a newer one is running, it returns the finished recording’s metadata instead of stopping the newer one.