> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-magnus-streaming-api-link.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Live preview & recording

> Watch the agent's browser in real time. Embed it in your app.

<Note>
  Want a ready-made UI? See the [Chat UI tutorial](/cloud/tutorials/chat-ui).
</Note>

<CodeGroup>
  ```python Python theme={null}
  import asyncio
  from browser_use_sdk.v3 import AsyncBrowserUse

  client = AsyncBrowserUse()
  session = await client.sessions.create("Check how many GitHub stars browser-use has")

  # liveUrl becomes available once the browser is ready
  while True:
      s = await client.sessions.get(str(session.id))
      if s.live_url:
          print(s.live_url)
          break
      await asyncio.sleep(0.5)
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v3";

  const client = new BrowserUse();
  const session = await client.sessions.create({
    task: "Check how many GitHub stars browser-use has",
  });

  // liveUrl becomes available once the browser is ready
  while (true) {
    const s = await client.sessions.get(session.id);
    if (s.liveUrl) {
      console.log(s.liveUrl);
      break;
    }
    await new Promise((r) => setTimeout(r, 500));
  }
  ```
</CodeGroup>

## Embed live browser into your app

Useful for human interaction or to see live what's happening.

```html theme={null}
<iframe
  src="{live_url}"
  width="1280"
  height="720"
  allow="autoplay"
  style="border: none; border-radius: 8px;"
></iframe>
```

## Customize

Append query parameters to the `liveUrl`:

| Parameter | Values                    | Description                             |
| --------- | ------------------------- | --------------------------------------- |
| `theme`   | `light`, `dark` (default) | Light or dark mode                      |
| `ui`      | `false`                   | Hide the browser chrome (URL bar, tabs) |

```
https://live.browser-use.com?wss=...&theme=light
https://live.browser-use.com?wss=...&ui=false
```

## Recording

Enable recording to get an MP4 video of the browser session. Only available when the agent actually opens a browser — tasks answered without browsing produce no recording. If you run multiple tasks in the same session (with `keep_alive`), you may get multiple recordings. Poll `sessions.get()` if `recording_urls` is empty — processing may take a few seconds for longer sessions.

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk.v3 import AsyncBrowserUse

  client = AsyncBrowserUse()
  result = await client.run(
      "Check how many GitHub stars browser-use has",
      enable_recording=True,
  )

  # Recording may not be ready immediately — poll (max 60s)
  import asyncio
  session = result
  for _ in range(30):
      session = await client.sessions.get(str(result.id))
      if session.recording_urls:
          break
      await asyncio.sleep(2)

  for url in session.recording_urls:
      print(url)  # presigned MP4 download URL
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v3";

  const client = new BrowserUse();
  const result = await client.run("Check how many GitHub stars browser-use has", {
    enableRecording: true,
  });

  // Recording may not be ready immediately — poll (max 60s)
  let session = await client.sessions.get(result.id);
  for (let i = 0; i < 30 && !session.recordingUrls?.length; i++) {
    await new Promise((r) => setTimeout(r, 2000));
    session = await client.sessions.get(result.id);
  }

  for (const url of session.recordingUrls) {
    console.log(url); // presigned MP4 download URL
  }
  ```
</CodeGroup>

## Public share links

Generate a public URL that anyone can open to watch the entire agent session — no API key needed. Useful for sharing with teammates, stakeholders, or embedding in dashboards.

<CodeGroup>
  ```python Python theme={null}
  share = await client.sessions.create_share(str(session.id))
  print(share.url)
  ```

  ```typescript TypeScript theme={null}
  const share = await client.sessions.createShare(session.id);
  console.log(share.url);
  ```
</CodeGroup>
