> ## Documentation Index
> Fetch the complete documentation index at: https://docs-preview.webcompute.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recordings

> Record browser-agent runs and use replay evidence when a run needs review.

Recordings help you inspect a run after the browser has moved on or closed.

## Enable recording in the SDK

```ts theme={null}
const agent = web.agent({
  model,
  browser: {
    create: { recording: true },
    policy: { allowedDomains: ["sec.gov"] },
  },
});
```

## Enable recording from browser commands

```bash theme={null}
BROWSER_ID=$(web browser create --recording --json | jq -r '.id')
web browser recording segments "$BROWSER_ID"
```

## Use recordings for review

Recordings are useful when:

* A run passed but the answer needs evidence.
* A run failed on a remote site but worked locally.
* An operator needs to review a long-running workflow.
* A blocker appeared after several steps.

## Replay in Debug UI

When recording is enabled, Debug UI can replay the captured browser session. Use the timeline to scrub through recorded frames, inspect browser metadata at that point in the run, and connect what the page showed to events, artifacts, downloads, or blocker state.

<img src="https://mintcdn.com/web-634f5865/kMyXyr8xUcQ6rZfT/images/product/debug-ui-replay.png?fit=max&auto=format&n=kMyXyr8xUcQ6rZfT&q=85&s=681daf99239799edd79f49b0a7af40ed" alt="Webcompute Debug UI replaying a recorded Apple browser session with the Browser panel and recording timeline visible" width="1800" height="1199" data-path="images/product/debug-ui-replay.png" />

Use replay when the live browser has moved past the important moment, when a reviewer needs visual evidence, or when a long-running workflow needs an audit trail without rerunning the task.

Replay positions can also be shared as browser moments. Use the share button in the timeline to copy a link for trusted reviewers or copy Markdown/JSON context for an agent that needs the timestamp, page URL, nearby events, console errors, and network failures around that point in the run.

## Download replay evidence

```ts theme={null}
const recording = await browser.recordings.get();
const segments = await browser.recordings.segments({ limit: 10 });
const firstSegment = segments.data[0];

if (firstSegment) {
  await browser.recordings.download(firstSegment.id, "./recordings", {
    overwrite: true,
  });
}
```

The download helper writes the segment manifest, event list, and frame files to the output directory. Keep those paths attached to the job record if your operators review runs outside the Webcompute Debug UI.

## What to store

* Browser ID.
* Recording summary.
* Segment IDs.
* Event IDs or timestamps relevant to the failure.
* Artifact and download IDs referenced during the run.

Do not expose recording files or signed capabilities to users who should not see the browser session.

<Tip>
  Keep recordings attached to the job or run record that produced them. They are evidence, not user-facing final answers.
</Tip>
