How kernel/kernel-images works
Kernel provides sandboxed Chromium sessions for browser automation, with optional interactive live view and session replay. The main workflow is an automation client connecting over CDP to a running browser; the API also exposes browser controls and agent-oriented tools. A wrapper starts and monitors the browser environment. Separate branches cover the remote GUI and lifecycle telemetry/standby. The README documents these capabilities; unsampled API and UI internals are represented at their enclosing source paths, so uncertain internal wiring is omitted.
Main entry points: main.go Kernel API · api Browser API handlers · eventstream.go Event stream · proxy.go DevTools proxy
Components 20
Browser runtime
- Environment wrapper
server/cmd/wrapper/main.go - Chromium launcher
server/cmd/chromium-launcher/main.go - Chromium browser
API and automation
- Kernel API
server/cmd/api/main.go - Browser API handlers
server/cmd/api/api - DevTools proxy
server/lib/devtoolsproxy/proxy.go - ChromeDriver proxy
server/lib/chromedriverproxy/proxy.go - Browser surface tracking
server/lib/browsersurface/tracker.go - WebMCP tools
server/lib/webmcpclient/manager.go - Browser REPL
server/runtime/browser-repl.ts
Remote live view
- Live-view client
images/chromium-headful/client/src/app.vue - Neko service
- Session recording
server/lib/recorder/recorder.go
Lifecycle and telemetry
- Event stream
server/lib/events/eventstream.go - Telemetry API
server/cmd/api/api/telemetry.go - S2 event storage
server/lib/events/s2storage.go - OTLP exporter
server/lib/events/otlpstorage.go - Scale-to-zero
server/lib/scaletozero/scaletozero.go
Other components
- Automation client
- Live-view user
Connections 21
- Environment wrapper → Chromium launcher: starts
- Chromium launcher → Chromium browser: executes
- Environment wrapper → Kernel API: starts services
- Automation client → DevTools proxy: connects CDP
- DevTools proxy → Chromium browser: proxies commands
- Automation client → ChromeDriver proxy: connects
- ChromeDriver proxy → Chromium browser: forwards requests
- Kernel API → DevTools proxy: starts proxy
- Kernel API → ChromeDriver proxy: starts proxy
- Kernel API → Browser API handlers: serves routes
- Browser API handlers → Browser surface tracking: tracks targets
- Browser API handlers → WebMCP tools: uses tools
- Browser API handlers → Browser REPL: exposes REPL
- Live-view user → Live-view client: views and controls
- Live-view client → Neko service: connects live view
- Chromium browser → Session recording: screen capture
- Kernel API → Telemetry API: serves telemetry
- Telemetry API → Event stream: publishes events
- Event stream → S2 event storage: appends events
- Event stream → OTLP exporter: exports records
- Kernel API → Scale-to-zero: applies standby middleware