How Much To Run AI

Kitesurf: run an agent browser on Cloudflare Workers

Run Kitesurf locally, use its hosted Browser Run beta or deploy it on Workers. Compare compatibility, access requirements and the full Cloudflare cost model.

Last updated: 2026-11-16

Kitesurf is an experimental browser engine built for AI agents. It parses HTML, applies CSS, runs page JavaScript and renders pages without bundling Chrome or a browser container. Its Chrome DevTools Protocol (CDP) endpoint lets clients such as Puppeteer connect to it.

Use Kitesurf for short tasks on compatible pages: extract rendered content, take a screenshot, or create a PDF. Cloudflare’s benchmark shows lower CPU and memory use than its Chromium browser, with slower wall time. Kitesurf is not a drop-in replacement for full Chrome, so test the target site before routing an important workflow through it.

Kitesurf routes: local development on your machine, hosted Browser Run beta free within account limits, or self-hosted Workers requiring a $5 paid plan plus metered Dynamic Workers usage and access protection.

Original diagram of documented browser routes and billing boundaries; agent-model usage is a separate cost.

Try it locally

A local build runs on your machine and does not require a Cloudflare account. It requires Bazelisk (installed as bazel), Node.js 22 or newer, and pnpm 9.15.4. On macOS, the README also requires GNU tar. The first build compiles Rust and WebAssembly components and can take a while.

git clone https://github.com/cloudflare/kitesurf.git
cd kitesurf
pnpm install --frozen-lockfile
pnpm run dev
curl http://127.0.0.1:8787/health

The health request should return a response from the local engine. To render a page through the local CDP endpoint, install puppeteer-core in your own project and connect to ws://127.0.0.1:8787/devtools/browser. The README includes a complete Puppeteer example that opens a page and saves a screenshot. Kitesurf implements a subset of CDP, not every Chrome DevTools feature.

Use the hosted Browser Run beta

Cloudflare’s hosted Kitesurf beta is available through Browser Run and is currently listed as free within per-account limits. You do not deploy the open-source engine for this route. For a one-shot screenshot, the Browser Run API accepts browser=kitesurf:

curl -X POST \
  "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/browser-run/screenshot?browser=kitesurf" \
  -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}' \
  --output screenshot.png

Use an API token with Browser Run access and your Cloudflare account ID. Existing Puppeteer, Playwright and CDP clients can select the same hosted engine by adding ?browser=kitesurf to the Browser Run WebSocket endpoint. An MCP client can connect through chrome-devtools-mcp with the endpoint and bearer-token header shown in Cloudflare’s Kitesurf guide.

Browser Run covers the browser session; it does not include model calls made by your agent. Those remain part of the agent provider’s plan or API bill.

The hosted Kitesurf beta policy is separate from Browser Run’s general browser-hour and concurrency meters. Start with a small request against the pages you intend to use, inspect returned content and account usage, then size the workload within the Kitesurf limits shown for your account. Recheck the beta’s policy before committing a recurring workflow to a zero browser-cost budget.

Deploy the open-source engine

The GitHub project is Apache-2.0 licensed. Bundled dependencies and other assets keep their own licenses; see the repository’s NOTICE file. The project is marked experimental. Local development uses wrangler dev; deployment to Cloudflare requires a Workers Paid plan because Kitesurf creates isolated Dynamic Workers for pages and renderers.

Before deployment, protect Workers with Cloudflare Access at the account level or configure an Access application for the hostname. The workers.dev URL is public by default, and the engine has no authentication of its own. Anyone who can reach an unprotected URL can browse through your engine, connect a CDP client, make outbound requests from your Cloudflare account and consume your paid CPU and Dynamic Workers. Deploying first and adding Access afterward leaves a public window. For CDP clients behind Access, create a service token, allow it with a Service Auth policy and send the CF-Access-Client-Id and CF-Access-Client-Secret headers. Keep those credentials secret; Cloudflare says the token grants the same access as a signed-in user.

After Access is ready, the repository’s deployment command is pnpm run deploy from the repository root. Wrangler uses the account selected by wrangler login, or the account and API token configured for deployment. Use the repository’s deployment instructions for its current build and Access configuration.

Estimate the self-hosted cost

Self-hosting is billed through Workers and Dynamic Workers, not Browser Run’s browser-hour meter. Cloudflare counts each unique Worker ID and code pair once per day, then sums those worker-day entries over the billing month. The plan includes 1,000 entries per month; each additional entry costs $0.002. Reusing one identity on another day counts again, while repeated calls to the same ID and code within one day share a creation count. The same plan includes 10 million requests and 30 million CPU milliseconds, then charges $0.30 per extra million requests and $0.02 per extra million CPU milliseconds. Dynamic Worker startup time, including isolate initialization and code parsing, counts as CPU. These request and CPU allowances are shared with other Workers usage in the account.

A cost example needs actual usage counts because one browser task can create both a page worker and a renderer, while a CDP workflow can make many calls and spend different CPU time. Suppose a monthly batch of 1,000 one-page tasks produces 2,000 worker-day entries during the month, and the account stays within its included request and CPU allowances. The first 1,000 counts are included; the next 1,000 cost $2. With the $5 Workers Paid minimum, the account bill attributable to this example is $7, or $0.007 per task if those 1,000 tasks are the only workload using that monthly plan. If the account already pays the $5 plan fee, the incremental Dynamic Worker creation charge is $2. Requests or CPU above the shared allowances add the rates above. Check Workers & Pages usage to replace these assumptions with your actual worker-day, request and CPU counts.

Where Kitesurf works and where it does not

Cloudflare’s November 13 guide recommends Kitesurf for compatible pages, one-shot screenshots, HTML extraction, PDFs and bursty isolated work. Its published five-run, 14-URL median benchmark reports 3.1–3.8 times less CPU and 4.7–7 times less memory than a warm Chromium pool, but screenshots take 1.8 times longer and HTML extraction 1.7 times longer. The benchmark is from Cloudflare, and lower CPU or memory does not mean an agent will finish every multi-step task sooner.

Cloudflare says Kitesurf is not suitable for video, WebGL, bot-challenge handshakes that rely on real TLS fingerprints, or long-running authenticated sessions that need persistent state. An independent Classmethod test by AnonymousPenguin, published October 24, 2026, used Claude Code with Sonnet 5.5 and ran nine tasks once per browser on Kitesurf 0.0.1 and three alternatives. Kitesurf completed eight correctly, versus nine for each alternative; it used 45 browser actions and 204 seconds versus local Chrome’s 35 actions and 132 seconds. The author also reported empty iframes and failures on some large JavaScript pages. The sample was small, predates the open-source release, and did not measure CPU, memory or price. It supports testing your own sites and checking page content after navigation, not a general performance verdict.

For an agent that needs your existing browser logins and tabs, OpenCode Browse connects a Chromium extension to an MCP client and hands login or 2FA steps back to you. For a browser-capable desktop agent, see agent-desktop. Kitesurf supplies the browser engine, while the agent supplies the model and action loop. Use TokenEconomizer for coding-agent token overhead, and the budget notes to add browser infrastructure and model calls across a complete task.

Sources

Checked 2026-11-16: Kitesurf repository README and license, open-source announcement, Cloudflare Kitesurf Browser Run guide, Browser Run pricing and limits, Dynamic Workers pricing, Workers pricing, and Classmethod’s independent Kitesurf test.