Cloudflare Kitesurf: A Browser Built for Agents, Not Humans — and What It Changes for Agentic Web Automation

·11 min read·Evergreen Tools Team

💡 Tool TipWhen doing this, Evergreen Tools' URL Parser, HTML to Markdown, Regex Tester make it easier.

Cloudflare launched Kitesurf on August 7, 2026, and the framing matters more than the product: it is a browser built for AI agents, not for people. Cloudflare says it decided to build it just twelve weeks earlier, and that it runs entirely on top of Cloudflare Workers. The pitch is deliberately unglamorous. A browser for agents does not need tabs, themes, or extensions; it needs to manage context windows, performance, token costs, scalability, and a threat model that includes prompt injection. That is a different product from a Chrome alternative, and it is worth understanding because agentic web automation is where a lot of 2026's value is being created. The deeper point is that web automation has quietly become a core agent capability, and it deserves the same care as any other tool call.

Global network concept

Built for agents, not humans

1. Extraction Instead of Rendering

The core design choice is what the browser optimizes for. Humans need pixels; agents need text. Cloudflare says Kitesurf is significantly more efficient in CPU and memory consumption than Chromium for common agentic tasks like screenshots and HTML extraction. Code sample 1 drives it straight from a Worker: launch a session, open a page, take the HTML content, close. Notice what is missing from that snippet: there is no render loop, no viewport, no human interface to wait on. Everything else runs inside Cloudflare Workers, which makes it stateless and highly scalable in the way a long-lived headless Chromium instance never is. Treating extraction as the default also changes your cost model. A screenshot is a large, mostly useless payload for a model that wants to read prices and specifications; text is both cheaper and more actionable.

// 1. Drive Kitesurf from Workers — extraction, not screenshots
// Kitesurf runs entirely on Cloudflare Workers and is free in beta
// inside Browser Run. Ask for structured text, not a pixel buffer.
export default {
  async fetch(req, env) {
    const session = await env.BROWSER_RUN.launch({ engine: "kitesurf" });
    const page = await session.open("https://example.com/pricing");
    const html = await page.content();        // cheaper than rendering pixels
    await session.close();
    return new Response(html, { headers: { "content-type": "text/html" } });
  },
};
// Cloudflare says Kitesurf uses significantly less CPU and memory than
// Chromium for common agentic tasks like screenshots and HTML extraction.

2. Protect the Context Window

The most expensive mistake in agentic browsing is treating a web page as free. A modern page with scripts, navigation, ads, and footers can blow past a model's context budget on its own. Cloudflare explicitly designed Kitesurf to help manage context windows and token costs, and Code sample 2 is the discipline that pairs with it: convert HTML to Markdown, strip scripts and boilerplate, keep tables, and truncate before the page reaches the model. Code sample 5 pushes the same idea into configuration, capping pages per task, bytes, and a token and dollar budget. Screenshots should be the exception, not the default. The discipline is the same one you apply to any retrieved document: fetch narrowly, convert aggressively, and pass the smallest representation that still answers the question.

// 2. Shrink the page before it eats your context window
import { htmlToMarkdown } from "./html-to-markdown";
import { countTokens } from "./tokens";

const MAX_TOKENS = 8_000;

export async function toAgentInput(html: string) {
  const md = htmlToMarkdown(html, {
    stripScripts: true,          // remove <script>, <style>, comments
    stripNav: true,              // drop boilerplate menus and footers
    keepTables: true,            // keep pricing tables and specs
  });
  const tokens = countTokens(md);
  return tokens <= MAX_TOKENS
    ? md
    : md.slice(0, MAX_TOKENS * 4) + "\n... [truncated]";
}
// A browser built for agents needs to manage context windows and token
// cost, not tabs and themes. Shrinking early is the cheapest win.

3. The Threat Model Is Prompt Injection

Cloudflare is direct that an AI browser faces a different threat model, naming prompt injection specifically. When an agent reads a page, that page is untrusted input written by someone who may not have your interests at heart. Code sample 3 treats fetched content as data, never as instructions: it scans for common injection patterns and, more importantly, wraps the text in an untrusted-content boundary so the model knows it is reading, not obeying. This single habit prevents the most common agentic-web failure, where a hidden instruction in a comment or a footer redirects the agent's goals. The untrusted boundary is not decoration. It changes how the model treats the text, and it gives you a clear place to enforce policy when a page tries to talk the agent into something.

// 3. Treat page content as untrusted data, never as instructions
// A browser for agents has a different threat model: prompt injection.
const INJECTION = [
  /ignore (all )?(previous|above) instructions/i,
  /you are now/i,
  /disregard .* and (send|transfer|delete)/i,
  /<!--[\s\S]*?(system|assistant)[\s\S]*?-->/i,
];

export function sanitizePageText(text: string) {
  for (const pattern of INJECTION) {
    if (pattern.test(text)) {
      throw new Error("Possible prompt injection in fetched page");
    }
  }
  // Wrap untrusted content so the model treats it as data, not orders.
  return `<untrusted_page_content>\n${text}\n</untrusted_page_content>`;
}

4. Isolation So Failures Stay Local

Because Kitesurf runs on Cloudflare Workers using isolates, pages are isolated from one another. Cloudflare's stated design ensures that if an agent accesses a malicious source on one page, it cannot corrupt other browser pages in the same task. Code sample 4 leans into that model: one session per URL, a per-page timeout, a try/catch that isolates a single failure instead of aborting the whole research run, and a finally block that always tears the session down. Parallel research across many sources becomes safe precisely because no two pages share state. Per-page isolation also makes partial failure survivable. A research task over twenty pages should still return nineteen results when one source times out or turns hostile.

// 4. One page per isolate — no cross-page leakage
// Cloudflare designed Kitesurf with isolation per page, so an agent
// hitting a malicious source on one page cannot corrupt others.
export async function research(urls: string[], env) {
  const results = await Promise.all(
    urls.map(async (url) => {
      const session = await env.BROWSER_RUN.launch({ engine: "kitesurf" });
      try {
        const page = await session.open(url, { timeoutMs: 15_000 });
        return { url, text: sanitizePageText(await page.toMarkdown()) };
      } catch (e) {
        return { url, error: String(e) };   // isolate the failure too
      } finally {
        await session.close();              // always tear the session down
      }
    }),
  );
  return results;
}

5. Budget the Browser Like Any Other Tool

Kitesurf being free in beta makes it tempting to skip the second half of the sentence: your context window, your latency, and your users' patience are never free. Code sample 5 puts the browser under the same budget discipline you apply to model calls, capping pages per task, per-page timeouts, HTML size, output formats, and a token and dollar ceiling. That is the same principle behind the whole premise of a browser built for agents: web automation is now a first-class agent capability, and first-class capabilities deserve first-class limits. Set the budget before the task, not after the invoice. A browser that can open unlimited pages with unlimited megabytes is not a convenience, it is an unbounded cost with a user interface.

# 5. Budget the browser so web tasks never run away
# Agent browsing is unbounded by nature; cap it like any other tool.
browser:
  engine: kitesurf
  max_pages_per_task: 12
  timeout_ms: 15000
  max_html_bytes: 2_000_000
  formats: [markdown, html]      # skip screenshots unless truly needed
  budget:
    tokens_per_task: 60000
    usd_per_task: 0.75
# Screenshots cost far more than HTML extraction; request them only
# when a visual decision truly requires pixels. Kitesurf is free in
# beta, but your context window and latency are never free.

6. What Agents Get From This

Kitesurf passes around 215,000 web platform tests and Cloudflare says it is adding hundreds more each week, so this is an early but real browser rather than a demo. It is built from a modular rendering engine from Blitz, Firefox's Stylo CSS parser, and Boa JS, and Cloudflare credits the open-source Obscura engine as its starting point. What it gives agent builders is the boring, necessary layer: a way to navigate, fill forms, and extract content without maintaining a fragile Chromium fleet. Pair it with extraction-first requests, aggressive context shrinking, injection defense, per-page isolation, and a hard budget, and web automation stops being the fragile part of your agent stack. The browser layer is getting the same treatment models did: purpose-built, isolated, and metered. That is a healthy sign for agentic web work.

Developer writing code

Extraction instead of rendering

Automation and workflow

Treat pages as untrusted input

📌 Frequently Asked Questions

What is Cloudflare Kitesurf?

A cloud-hosted browser launched on August 7, 2026, designed specifically for AI agents rather than humans. It runs entirely on Cloudflare Workers and is free while in beta inside Browser Run.

How is it different from Chrome?

It strips the human interface: no tabs, themes, or extensions. It is optimized for agentic concerns like context windows, performance, token cost, scalability, and prompt-injection threats, and Cloudflare says it uses significantly less CPU and memory than Chromium for tasks like screenshots and HTML extraction.

What is it built from?

A modular rendering engine from Blitz, Firefox's Stylo CSS parser, and Boa JS, a Rust ECMAScript engine, with everything else running inside Cloudflare Workers. Cloudflare credits the open-source Obscura headless engine as its starting point.

Is it production-ready?

It is in beta and free, and Cloudflare says it passes around 215,000+ web platform tests while adding hundreds more weekly. It renders pages like TodoMVC, Wikipedia, Hacker News, and the Cloudflare Blog, but it is early rather than finished.

What is the main security risk to plan for?

Prompt injection. A page an agent reads is untrusted input, so scan for injection patterns and wrap fetched content in an explicit untrusted boundary so the model treats it as data rather than instructions.