Skip to content
INTERNET INFRASTRUCTURE & NETWORKS

Cloudflare Open Sources Kitesurf, a Stateless Browser Built Specifically for AI Agents

Cloudflare has officially fulfilled a major commitment made to the developer community earlier this year by open-sourcing Kitesurf, its innovative stateless browser engineered explicitly to run on top of Cloudflare Workers. Originally introduced in August with subsequent feature updates rolling out in September—including WebMCP support, expanded APIs, and enhanced compatibility—the project is now publicly available on GitHub under the Apache 2.0 license. This release allows developers worldwide to inspect the codebase, run instances locally, modify the underlying architecture, and deploy their own tailored browser engines directly to their Cloudflare accounts.

A Browser Built for AI Agents

The conception of Kitesurf stems from a fundamental mismatch between traditional browsers and the needs of modern autonomous AI systems. Standard tools like Chromium are heavy, monolithic applications designed for human users navigating complex desktop environments. They demand significant CPU and memory resources to render web pages, execute scripts, and maintain state. For AI agents tasked with scraping data, interacting with web applications, or automating workflows at scale, running dozens or hundreds of full browser instances becomes prohibitively expensive and resource-intensive.

Kitesurf approaches this challenge from an entirely different angle. Operating entirely on Cloudflare Workers, the platform parses HTML, applies CSS, executes page JavaScript, and generates screenshots without requiring a traditional browser container. By leveraging Cloudflare’s massive, globally distributed edge network, Kitesurf scales effortlessly on demand while consuming a fraction of the computational overhead associated with conventional desktop browsers. Furthermore, the engine natively supports the Chrome DevTools Protocol (CDP), allowing developers to easily hook up popular client automation libraries such as Puppeteer.

Inside the Kitesurf Architecture

Under the hood, Kitesurf represents a sophisticated convergence of Cloudflare’s native developer platform and an ecosystem of open-source Rust packages compiled efficiently to WebAssembly. The repository incorporates various third-party packages, each retaining their respective licenses as meticulously documented within the project’s official repository notices.

The architectural design of Kitesurf is divided into three primary components that work in tandem to process web content at the edge. The Engine is responsible for managing browser sessions and handling incoming client connections. The PageScript component takes charge of executing the target page and running its associated JavaScript environment. Finally, the PageRenderer handles the visual output by drawing the resulting data.

All of these foundational elements—including the core engine, the underlying Rust components, specialized DOM shims, the rendering pipeline, and the Kitesurf CLI—are organized into dedicated folders within the repository’s packages directory. This modular layout provides clear visibility into how the various pieces integrate to form a cohesive, lightweight browser environment.

Kitesurf is now open source

Running and Deploying Kitesurf Locally

Developers interested in experimenting with the technology can pull the repository from GitHub, ensure their local environment meets the necessary build requirements, install the required dependencies, and initialize the engine. Because the initial build process compiles the Rust core and its associated dependencies from scratch, the first compilation requires a brief waiting period, whereas subsequent builds take advantage of cached artifacts. Once initialized, Wrangler—Cloudflare’s command-line tool for Workers—spawns a local development server.

Developers can interact with this local instance either programmatically or through standard automation tools. For instance, connecting via Puppeteer in a Node.js script involves establishing a websocket connection to the local CDP endpoint, allowing scripts to effortlessly open new pages, navigate to target URLs, capture automated screenshots, and manage the lifecycle of the session. Alternatively, engineers can direct any AI harness straight to the local CDP port, giving autonomous agents immediate, fine-grained control over the browser session for research, testing, or automated task execution.

Once local testing and modifications are complete, developers are not restricted to Cloudflare’s managed Browser Run APIs. The engine can be deployed directly to an individual’s own Cloudflare account. Because Kitesurf utilizes Dynamic Workers to provision isolated worker environments for individual pages, utilizing this deployment option requires a Workers Paid plan to accommodate the dynamic instantiation of resources across the edge network.

Contributing and Future Development

As part of Cloudflare’s broader open-source ecosystem, Kitesurf is hosted on GitHub where the maintainers actively welcome forks, community engagement, and pull requests. However, the engineering team notes that the project remains under active and rapid development. Current priorities focus heavily on driving web standards compatibility—tracked via the Web Platform Test evolution metrics—alongside improvements to overall reliability and execution efficiency.

Contributors looking to get involved are encouraged to consult the project’s formal contribution guidelines before submitting code. The maintainers recommend opening an issue featuring a minimal reproduction or a clearly articulated proposed approach, and securing a consensus or vouch from a maintainer prior to opening a pull request. Focused, well-scoped fixes accompanied by proper tests and clear evidence are significantly easier to review than sweeping rewrites. Contributions are not strictly limited to core code; developers can also contribute by submitting small pages that reproduce rendering bugs, reporting failing automation workflows, or refining project documentation.

As Kitesurf continues to evolve at a rapid pace, the team plans to share ongoing updates through the official company blog and product changelogs, while tracking standards compliance and performance benchmarks on the dedicated Kitesurf landing page and community channels.