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))
import { BrowserUse } from "browser-use-sdk/v3";

const client = new BrowserUse();

const session = await client.sessions.create();

const result1 = await client.run("Log into example.com with user@test.com", {
  sessionId: session.id,
  keepAlive: true,
});
const result2 = await client.run("Now go to settings and change the timezone", {
  sessionId: session.id,
});

await client.sessions.stop(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.