Skip to main content
Want a ready-made UI? See the Chat UI tutorial.
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(session.id)
    if s.live_url:
        print(s.live_url)
        break
    await asyncio.sleep(0.5)

Embed live browser into your app

Useful for human interaction or to see live what’s happening.
<iframe
  src="{live_url}"
  width="1280"
  height="720"
  allow="autoplay"
  style="border: none; border-radius: 8px;"
></iframe>

Customize

Append query parameters to the liveUrl:
ParameterValuesDescription
themelight, dark (default)Light or dark mode
uifalseHide 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.
from browser_use_sdk.v3 import AsyncBrowserUse

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

# Waits up to 15s for recording to be ready. Returns [] if no browser was opened.
urls = await client.sessions.wait_for_recording(result.id)
for url in urls:
    print(url)  # presigned MP4 download URL
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.
share = await client.sessions.create_share(session.id)
print(share.url)