Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-intro-create-control-observe.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Browser agents fail in ways that don’t show up in logs. Kernel gives you four ways to see what’s actually happening — live, after the fact, frame by frame, and line by line.

Live view

Every browser exposes a browser_live_view_url you can open in a browser tab or embed in an iframe. Use it to watch an agent run in real time, hand a session off to a human-in-the-loop, or surface the browser as part of your own UI.
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const kernelBrowser = await kernel.browsers.create();
console.log(kernelBrowser.browser_live_view_url);
Add ?readOnly=true for a non-interactive view, or enable kiosk mode at creation for a fullscreen, chromeless experience. Full reference: Live View.

Replays

Replays are MP4 recordings you start and stop on demand. They’re the right tool for post-hoc debugging: a failed run produces a video you can scrub through, share, or attach to a bug report.
const replay = await kernel.browsers.replays.start(kernelBrowser.session_id);

// ...run the agent...

await kernel.browsers.replays.stop(replay.replay_id, {
  id: kernelBrowser.session_id,
});
Full reference: Replays.

Screenshots

Pull a frame at any moment with computer controls — useful for snapshotting state at decision points, attaching to traces, or feeding back into a vision model.
const screenshot = await kernel.browsers.computer.captureScreenshot(
  kernelBrowser.session_id,
);
For full-page captures, use Playwright execution instead.

Invocation logs

If you’re running an agent on Kernel’s app platform, every invocation produces a streaming log feed. Tail it live while the agent runs, or pull it after the fact for debugging.
const logs = await kernel.invocations.follow(invocationId);

for await (const event of logs) {
  console.log(event);
}
Full reference: Logs.

Picking the right tool

  • Building the agent? Keep a live view tab open while you iterate.
  • Debugging a failure? Capture a replay for the run, then watch the video.
  • Instrumenting the agent itself? Drop screenshots and logs into your traces at the points that matter.
  • Putting a human in the loop? Embed the live view in your own UI.