> ## 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.

# Live browser sessions

> Open trusted Debug UI links to inspect live Webcompute browser-agent runs.

Use a live browser session when you need to see the page the agent is working with.

## CLI

Ask `web agent` to include a signed Debug UI URL while the run is active:

```bash theme={null}
web agent \
  --debug-url \
  --url https://www.sec.gov/edgar/search/ \
  --allow-domain sec.gov \
  "Find Apple's latest 10-Q filings and return filing metadata."
```

Use `--debug-url` only when the person or system receiving the output should control the live browser.

## SDK

For post-run inspection, own the browser lifetime with an agent session or an explicitly created browser. A one-shot `agent.run(...)` closes an implicitly created browser when the run completes.

```ts theme={null}
const session = await agent.session({
  startUrl: "https://www.sec.gov/edgar/search/",
});

const browser = await web.browser.get(session.browserId);
const debugUrl = await browser.debugUrl();

try {
  const result = await session.run("Find Apple's latest 10-Q filings.");
  console.log(result.text);
} finally {
  await session.close();
}
```

<Warning>
  A Debug UI URL is a signed bearer capability. Do not paste it into shared logs or untrusted prompts.
</Warning>

## Share a browser moment

Use the share button in the Debug UI timeline, or press `Ctrl+Shift+S` / `Cmd+Shift+S`, when another person or agent needs the exact browser state you are looking at. In live mode, the share sheet captures the current live position. In replay mode, it captures the scrubbed timestamp and can include playback speed.

<img src="https://mintcdn.com/web-634f5865/kMyXyr8xUcQ6rZfT/images/product/debug-ui-share-sheet.png?fit=max&auto=format&n=kMyXyr8xUcQ6rZfT&q=85&s=6d378fb5568899e1af69f479434b633e" alt="Webcompute Debug UI share sheet for a browser moment with a share link and agent-context export buttons" width="1800" height="1212" data-path="images/product/debug-ui-share-sheet.png" />

Use the share link for trusted humans who need to open the same browser moment. Use `Copy as Markdown` or `Copy as JSON` when an agent, support workflow, or internal tool needs the context without receiving a screen share.

The agent context can include the recording segment, timestamp, sanitized Debug UI URL, page URL, browser status, readiness, active page, control lease state, nearby events, console errors, and network failures when those signals are available.

Good uses for browser moments:

* Hand a reviewer the exact page state behind an approval or blocker.
* Give an agent the current URL, timestamp, and nearby diagnostic signals before asking it to reason about the run.
* Attach a specific browser moment to a support ticket, incident note, or job review.

<Warning>
  Browser-moment links inherit the Debug UI capability. Share them only with people or systems that should inspect that browser session. Markdown and JSON context can also contain sensitive page evidence.
</Warning>

## What to look for

* Final URL and page title.
* Visible blocker or login state.
* Unexpected navigation.
* Dialogs or downloads.
* Whether the page matches the agent's final answer.

Use recordings when the browser should be inspectable after it closes.
