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

# Human in the loop

> Open the V4 live browser, let a person take over, then continue the same session.

Use a human checkpoint for approvals, payments, complex authentication, or reviewing work before the agent continues.

The run's `browser.ready` event contains a `live_view_url`. After the first turn stops at a safe checkpoint, open that URL, let the human interact, then send a follow-up with the same session ID.

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

  client = AsyncBrowserUse()
  created = await client.runs.create(
      "Find noise-cancelling headphones on Amazon and stop before selecting a product"
  )
  await client.runs.wait_for_completion(created.id)

  events = await client.runs.events(created.id, limit=100)
  ready = next(event for event in events.events if event.type == "browser.ready")
  live_url = ready.data["live_view_url"]
  print(f"Open this live browser: {live_url}")

  input("Press Enter after selecting a product...")

  follow_up = await client.runs.create(
      "Get the selected product's name, price, and rating",
      session_id=created.session_id,
  )
  result = await client.runs.wait_for_completion(follow_up.id)
  print(result.result)
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v4";
  import * as readline from "node:readline/promises";

  const client = new BrowserUse();
  const created = await client.runs.create({
    task: "Find noise-cancelling headphones on Amazon and stop before selecting a product",
  });
  await client.runs.waitForCompletion(created.id);

  const events = await client.runs.events(created.id, { limit: 100 });
  const ready = events.events.find((event) => event.type === "browser.ready");
  const liveUrl = ready?.data.live_view_url;
  console.log(`Open this live browser: ${liveUrl}`);

  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
  await rl.question("Press Enter after selecting a product...");
  rl.close();

  const followUp = await client.runs.create({
    task: "Get the selected product's name, price, and rating",
    sessionId: created.sessionId,
  });
  const result = await client.runs.waitForCompletion(followUp.id);
  console.log(result.result);
  ```
</CodeGroup>

The browser is kept alive for follow-ups when possible. If it has expired, V4 restores the conversation and workspace but provisions a new browser, so complete the human step before the live browser's timeout.

<Warning>
  Treat live-view URLs as credentials. Anyone with the URL can interact with the browser while it is active.
</Warning>

See [Get run events](/cloud/api-v4/runs/get-run-events) for the event response.
