Skip to main content
from browser_use_sdk.v3 import AsyncBrowserUse

client = AsyncBrowserUse()

session = await client.sessions.create()

result1 = await client.run(
    "Log into example.com with user@test.com",
    session_id=str(session.id),
    keep_alive=True,
)
result2 = await client.run(
    "Now go to settings and change the timezone",
    session_id=str(session.id),
)

await client.sessions.stop(str(session.id))
Use keep_alive: true to keep the session running after a task completes. Without it, the session auto-stops when the task finishes.