Add Live View and Human in the Loop feature docs#29758
Add Live View and Human in the Loop feature docs#29758kathayl wants to merge 2 commits intoproductionfrom
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
…ng, add coming-soon handoff note, style fixes
| // Get the Live View URL so a human can interact with the session | ||
| const cdp = await page.createCDPSession(); | ||
| const { devtoolsFrontendUrl: liveUrl } = await cdp.send( | ||
| "Cloudflare.getLiveView" |
There was a problem hiding this comment.
This is not out yet. Users would instead create the session using POST to /devtools/browser?includeTargets=true and the use the devtoolsFrontendUrl
There was a problem hiding this comment.
and then connect to https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/browser-rendering/devtools/browser/<sessionId>
| ); | ||
|
|
||
| // Share the Live View URL with the human operator | ||
| console.log(`Human input needed. Open this URL: ${liveUrl}`); |
There was a problem hiding this comment.
Would add "You have to X time to complete this action or the script will continue"
There was a problem hiding this comment.
Also, add a comment saying send to users's chat, be it slack or other.
|
|
||
| ## Use cases | ||
|
|
||
| - **Authentication flows**: Login pages with MFA, SSO, or CAPTCHA that cannot be bypassed programmatically |
There was a problem hiding this comment.
Would add a note saying that we're still recognized as a bot so in many cases we may still be blocked (eg google sign on)
| 3. The human operator opens the Live View URL and completes the required action (logging in, solving a CAPTCHA, entering sensitive data, etc.). | ||
| 4. The automation script detects that the human is done (for example, by waiting for a navigation event or polling for a page element) and resumes. | ||
|
|
||
| A more structured handoff flow where the agent can signal that it needs help and notify a human is coming soon. |
There was a problem hiding this comment.
Would add more highlight to this since right now, this is sort of a poor man's handoff.
| | Mode | URL pattern | Description | | ||
| | --- | --- | --- | | ||
| | Tab | `https://live.browser.run/ui/view?mode=tab&wss=...` | DevTools inspector panel (Elements, Console, Network, etc.) | | ||
| | Full | `https://live.browser.run/ui/view?mode=full&wss=...` | Full browser chrome with address bar and tab strip | |
There was a problem hiding this comment.
Would prefer we dont announce this yet, not thoroughly tested and will be the focus of HITL.
| | Tab | `https://live.browser.run/ui/view?mode=tab&wss=...` | DevTools inspector panel (Elements, Console, Network, etc.) | | ||
| | Full | `https://live.browser.run/ui/view?mode=full&wss=...` | Full browser chrome with address bar and tab strip | | ||
| | Inspector | `https://live.browser.run/ui/inspector?wss=...` | Standalone inspector view | | ||
|
|
There was a problem hiding this comment.
|
|
||
| 3. Copy the `devtoolsFrontendUrl` and open it in your browser. | ||
|
|
||
| ## Get the Live View URL programmatically |
Summary
Screenshots (optional)
Documentation checklist