agent.stream(...) when users or operators should see progress during a browser-agent run.
Events to handle
| Event | Use it for |
|---|---|
run.started | Create a job record or progress row. |
browser.created | Store the browser ID and optional debug capability. |
tool.completed | Show the latest browser step, page title, or URL. |
observation | Track how much page evidence the agent saw. |
artifact | Store files, downloads, or generated evidence. |
confirmation.requested | Ask a human or policy service for a decision. |
run.completed | Persist the final result and route by event.result.status. |
Logging rules
- Do not log raw secrets.
- Do not log signed Debug UI or CDP URLs unless your log store is trusted for bearer capabilities.
- Store source URLs and status so operators can review the run later.
- Keep user-facing progress short; put verbose diagnostics behind an operator view.