Use this file to discover all available pages before exploring further.
Kernel browsers were designed to be lightweight and fast. Your agent can quickly create them on-demand and tear them down as soon as it is done using them. They can be used as part of the Kernel app platform or connected to from another service with the Chrome DevTools Protocol.
Kernel browsers support three connection methods: CDP for framework-level browser automation, WebDriver BiDi for W3C-standard control, and Computer Controls for OS-level mouse/keyboard input ideal for vision-based LLM loops.
CDP
WebDriver BiDi
Computer Controls
Connect with any Chrome DevTools Protocol framework like Playwright or Puppeteer. Use cdp_ws_url from the created browser session.
Connect with Vibium or any WebDriver BiDi-compatible client. Use webdriver_ws_url from the created browser session.
import { browser } from 'vibium';const bro = await browser.start(kernelBrowser.webdriver_ws_url);const page = await bro.page();await page.goto('https://example.com');const title = await page.title();console.log(title);
Control the browser’s mouse, keyboard, and screen directly through the Kernel SDK — no CDP or WebDriver connection needed. This is ideal for vision-based LLM loops like Claude Computer Use.
import Kernel from '@onkernel/sdk';const kernel = new Kernel();const kernelBrowser = await kernel.browsers.create();// Take a screenshotconst response = await kernel.browsers.computer.captureScreenshot(kernelBrowser.session_id);// Click at coordinatesawait kernel.browsers.computer.clickMouse(kernelBrowser.session_id, { x: 100, y: 200,});// Type textawait kernel.browsers.computer.typeText(kernelBrowser.session_id, { text: 'Hello, World!',});
When you’re finished with the browser, you can delete it:
import Kernel from '@onkernel/sdk';const kernel = new Kernel();await kernel.browsers.deleteByID(kernelBrowser.session_id);
Browsers automatically delete after a timeout (default 60 seconds) if they don’t receive a CDP or live view connection. You can configure this timeout when creating the browser.
Once you’ve connected to the Kernel browser, you can do anything with it.
Kernel browsers launch with a default context and page. Make sure to access
the existing context and
page
(contexts()[0] and pages()[0]), rather than trying to create a new one.