Humans-in-the-loop can access the live view of Kernel browsers in real-time to resolve errors or take unscripted actions.

To access the live view, visit the browser_live_view_url provided when you create a Kernel browser:

import { Kernel } from '@onkernel/sdk';
const kernel = new Kernel();
const kernelBrowser = await kernel.browsers.create({ invocation_id: runtime_context.invocation_id });
console.log(kernelBrowser.browser_live_view_url);

If using Kernel’s app platform, you can tail the logs to print the live view URL:

kernel logs <your-app>> --follow

Browser persistence

If you marked a browser for persistence, browser_live_view_url remains active after the invocation ends. It remains active until you terminate the browser.

For browsers not marked for persistence, browser_live_view_url becomes invalid once the invocation’s status reaches a terminal state (SUCCEEDED or FAILED). In the case of remote browsers, the live view remains active until you call browser.close().