Cloudflare open-sources Kitesurf, a browser for AI agents

Cloudflare has open-sourced Kitesurf, a browser built for AI agents. It is released under the Apache 2.0 license, the code is on GitHub, and the project site is kitesurf.dev. The browser runs on Cloudflare Workers and can parse HTML, process CSS and execute JavaScript without needing a browser container.

Cloudflare states its goal plainly:

“Our main goal is to give AI agents a lightweight, efficient browser — one that can load websites, execute JavaScript, and interact with pages while using less CPU and memory than a full browser like Chromium.”

From porting experiment to open source, in three steps

Kitesurf started from obscura, an open-source headless engine written in Rust that advertises “no Chrome, no Node.js, no dependencies.” The Cloudflare team first asked an AI agent to port it to Workers. Results were poor at the start, and the prototype only came together after the agent was given a detailed plan and clear success criteria.

According to the Cloudflare blog, it took 12 weeks from the decision to start until the formal release. At its debut, Kitesurf shipped as a free beta inside Browser Run, Cloudflare’s headless browser automation service, where developers could switch to it by adding a browser=kitesurf parameter to the API. Cloudflare promised at the time to open-source it “when ready,” and one report noted that the launch post gave no timetable. The open-sourcing now reported by Phoronix fulfills that promise.

On the development side, the team used the Web Platform Tests, the W3C’s standards-conformance test suite, as the acceptance criteria for the AI agent, while humans handled architecture and review. By the time of the blog post, Kitesurf passed roughly 215,000 tests, with a few hundred more added every week. To close the gap between standards tests and real websites, the team also used Puppeteer to run Chromium and Kitesurf side by side on live sites, comparing assertions and rendered screenshots step by step.

Illustration: a heavy truck and light sail carts symbolize the lightweight Cloudflare AI browser

How it is put together

Kitesurf is split into three parts:

  • Engine: the only externally facing component. It handles the Chrome DevTools Protocol (CDP) and keeps session state, so clients such as Puppeteer and Playwright can connect to it directly.
  • PageScript: each page gets its own Workers isolate. HTML and CSS parsing use a module of Blitz, the Rust rendering engine, together with Firefox’s Stylo. When a page calls eval, which Workers does not support natively, the call is handed to Boa, a JS engine written in Rust.
  • PageRenderer: draws the page object into pixels and outputs JPEG, PNG or PDF. It holds no page state, and if it hangs it is simply killed and restarted.

All outbound network requests go through a single SandboxOutbound component, and each page gets its own cookie jar. Cloudflare’s design assumes every load is untrusted input and starts every session from a blank slate, aimed at risks specific to agents such as prompt injection and tool-call safety.

A rough count of how many sessions fit on one machine

Cloudflare ran each of 14 URLs for 5 rounds and took the median. In the HTML extraction task, Kitesurf used 39.4 MiB of memory against 273.7 MiB for a warm Chromium pool, a 7x difference; in the screenshot task the gap was 4.7x.

Going by the screenshot numbers, 1 GiB of memory could hold about 17 Kitesurf sessions at once, compared with 3 to 4 for Chromium. Real deployments also have to account for scheduling overhead and peak load, so that ratio should be read as an upper bound. Cloudflare’s own position is that memory and CPU are what drive the bill, while on wall-clock time Chromium is 1.7 to 1.8 times faster, with the gap coming mainly from rasterization and image encoding, which it says it will keep optimizing.

The limitations are spelled out as well: Kitesurf cannot currently play video, cannot render WebGL, and does not use a real TLS fingerprint to pass anti-bot checks. Pages the project lists as rendering correctly include Wikipedia, Hacker News and TodoMVC in several framework versions. For developers in China, the open-source release means they can deploy it in their own Workers account without going through the Browser Run quota, but compatibility with complex sites will have to be tested by themselves.

Sources: Cloudflare official blog, Phoronix, CocoLoop, H2S Media; the CPU, memory and timing medians for the 14-URL test set and the WPT pass count were checked against the Cloudflare blog.