kernel/kernel-images

Browsers-as-a-service for automations and web agents

Kernel Images – Sandbox‑ready Chrome for AI agents

What it is

  • A set of Docker‑ and Unikraft‑based container images that run a full (headful) Chromium browser in a sandboxed environment.
  • The browser is exposed via the Chrome DevTools Protocol (CDP) so automation frameworks like Playwright or Puppeteer can drive it remotely.
  • A live‑view GUI (VNC or WebRTC) lets you watch or interact with the browser in real time, and a built‑in recorder can capture the session as an MP4.

Why it matters for AI / agents

  • Modern LLM‑powered agents often need to browse the web, fill forms, or scrape data. Kernel Images gives them a dedicated, isolated Chrome instance that can be started, stopped, and even snap‑shotted with near‑zero latency.
  • The Unikraft version adds standby and instant‑restart (<20 ms) so agents can keep a session alive across invocations without paying the cost of a full browser launch each time.

Key features

Feature What you get
Sandboxed Chrome Runs inside a container/unikernel; no host‑system access.
CDP endpoint (port 9222) Connect Playwright, Puppeteer, or any CDP client.
Remote GUI Live view via NoVNC (read/write) or WebRTC (faster, supports resize, copy/paste).
Configurable view Switch to read‑only mode, set window dimensions, enable/disable WebRTC.
Session snap‑shot (Unikraft) When idle, the unikernel sleeps and its state (cookies, page, zoom) is saved and can be restored instantly.
Fast cold start (Unikraft) <20 ms restart time, ideal for low‑latency event handling.
Screen recording One‑at‑a‑time MP4 capture via a tiny HTTP API (/recording/start, /stop, /download).
Resource‑efficient standby Negligible CPU/memory when no network activity.

Typical use‑cases

  • LLM‑driven web agents that need a persistent browser session (e.g., login once, then reuse cookies).
  • Automated testing of web‑apps in CI pipelines where isolation and reproducibility are required.
  • RAG pipelines that fetch live web content under controlled conditions.
  • Demo or teaching environments where you want to stream a browser UI to a remote audience.

How to run

  1. Docker (quick start)
    cd images/chromium-headful
    IMAGE=kernel-docker ./build-docker.sh
    IMAGE=kernel-docker ENABLE_WEBRTC=true ./run-docker.sh
    
    • Exposes CDP on localhost:9222 and GUI on port 443 (VNC or WebRTC).
  2. Unikraft unikernel (for ultra‑fast standby/restart)
    curl -sSfL https://get.kraftkit.sh | sh          # install Kraft CLI
    export UKC_METRO=<region>
    export UKC_TOKEN=<secret>
    IMAGE=YOUR_UKC_USERNAME/chromium-headless-test:latest images/chromium-headless/build-unikernel.sh
    IMAGE=YOUR_UKC_USERNAME/chromium-headless-test:latest images/chromium-headless/run-unikernel.sh
    
    • Requires ≥8 GiB memory; can enable WebRTC streaming with ENABLE_WEBRTC=true and provide TURN/STUN servers.

Connecting from code

// fetch CDP websocket URL
const resp = await fetch('http://localhost:9222/json/version');
const {webSocketDebuggerUrl} = await resp.json();

// Puppeteer example
const browser = await puppeteer.connect({browserWSEndpoint: webSocketDebuggerUrl});

The same URL works with Playwright’s chromium.connectOverCDP.

Recording a session

curl http://localhost:10001/recording/start -d {}
# …run your automation…
curl http://localhost:10001/recording/stop -d {}
curl http://localhost:10001/recording/download --output session.mp4

Where to learn more


Bottom line: Kernel Images provides a ready‑to‑use, isolated Chrome environment that AI agents can drive via standard automation libraries, with optional ultra‑fast unikernel deployment for low‑latency, state‑preserving workloads.

Related

  • Project
  • Project
  • Project
  • Project
  • Project