Cloudflare open-sourced Kitesurf, its stateless browser for AI agents that runs on Cloudflare Workers, under the Apache 2.0 license. Unlike containerized Chromium, Kitesurf parses HTML, applies CSS, executes page JavaScript, and renders screenshots purely in Workers, exposing the Chrome DevTools Protocol (CDP) so clients like Puppeteer (or AI harnesses) can connect.
Key technical details:
- Built on open-source Rust packages compiled to WebAssembly: Blitz (HTML/DOM/layout/painting), Stylo (CSS), Boa (JS in WASM, used only as a fallback when Dynamic Workers can't run JS), plus Linebender libraries for text/2D graphics and Krilla for PDF output.
- Architecture: an Engine (sessions and client connections), PageScript (runs the page and its JS), and PageRenderer (drawing), organized as packages including a Kitesurf CLI.
- Local dev: clone the repo,
pnpm install --frozen-lockfile && pnpm run dev; the first build compiles the Rust core, then Wrangler serves on 127.0.0.1:8787. Deploy with pnpm run deploy.
Limitations: self-deployment requires a Workers Paid plan (dependency on Dynamic Workers for per-page isolation); the project is under heavy development with compatibility still being tracked via Web Platform Tests; contributions require maintainer vouching before opening PRs.