Dev News Daily ENDE

Cloudflare open-sources Kitesurf, its browser engine for AI agents that runs on Workers

Cloudflare has published Kitesurf, the browser engine for AI agents it introduced in August, as open source under the Apache 2.0 licence. The announcement went out on the Cloudflare blog on 13 November. The company had added WebMCP support and new APIs in September and had said each time that it would release the code.

Kitesurf runs entirely on Cloudflare Workers. It parses HTML, applies CSS, executes page JavaScript and renders screenshots without a browser container, and it speaks the Chrome DevTools Protocol, so clients such as Puppeteer can connect to it. Cloudflare says the aim is a lightweight browser that loads pages, runs JavaScript and interacts with them while using less CPU and memory than a full browser such as Chromium.

The repository builds on open-source Rust packages compiled to WebAssembly. Blitz provides HTML parsing, the DOM, layout and painting; Stylo handles CSS parsing, cascading and computed styles; Boa runs JavaScript inside WebAssembly, but only as a last resort when the code cannot run in Dynamic Workers; Linebender libraries cover text layout and 2D graphics, and Krilla produces PDF output. Kitesurf itself has three parts: the Engine manages browser sessions and client connections, PageScript runs the page and its JavaScript, and PageRenderer draws the result.

To run it locally, the post lists cloning the repository, pnpm install --frozen-lockfile and pnpm run dev. The first build compiles the Rust core and takes a while; wrangler then serves the engine at http://127.0.0.1:8787, and a Puppeteer script can connect with browserWSEndpoint: "ws://127.0.0.1:8787/devtools/browser". pnpm run deploy puts the engine on a customer's own account, as an alternative to the managed Browser Run APIs. That requires the Workers Paid plan, because Kitesurf uses Dynamic Workers to create an isolated Worker for each page.

Cloudflare describes the engine as under heavy development, with work focused on compatibility, measured against Web Platform Tests, as well as reliability and efficiency. Contributors are asked to open an issue with a minimal reproduction or a proposed approach and to be vouched for by a maintainer before sending a pull request.

Cloudflare open-sources Kitesurf, its browser engine for AI agents that runs on Workers
Cloudflare open-sources Kitesurf, its browser engine for AI agents that runs on Workers — Dev News Daily

Why it matters

Teams that use Browser Run for agents can now read the engine's code and host it themselves. The constraints are stated in the same post: self-hosting needs a paid Workers plan, the engine is still changing quickly, and outside pull requests go through a maintainer first.

Written by Victoria Shinder.