AI agents are evolving from chatbots that summarize search result links into autonomous executors that compare products, narrow down filters, add items to carts, and complete bookings or payments on a user's behalf. Technical discussions about making a service available to AI agents usually focus on building dedicated machine-oriented interfaces, such as public APIs, CLIs, or Model Context Protocol (MCP) servers. Because of this, you might feel that AI agents aren't relevant to your service yet if you haven't built an API, CLI, or MCP server. In practice, however, AI agents are already accessing standard websites built for humans, whether or not those dedicated interfaces exist.

So what happens behind the scenes when a website itself—rather than an API or CLI—interacts with an AI agent? When agents read information from and operate public web pages, there are several mechanisms worth understanding:

  • Direct URL fetching and Markdown conversion: Agents fetch HTML or Markdown directly with HTTP GET requests. This approach reads articles and documentation at low cost, but can't handle JavaScript-rendered content or UI interactions.
  • Headless browser rendering: A browser engine renders the DOM to read dynamic pages such as SPAs. While this handles client-side JavaScript, running browsers consumes significant memory and CPU.
  • Browser use: Agents operate the UI by observing the screen and DOM and running a reasoning loop of clicks and text input. This approach can complete tasks on existing sites without APIs, but it suffers from high latency, heavy token consumption, and fragility when the UI changes.
  • WebMCP: The page itself exposes its capabilities as tools through document.modelContext. While choosing which tool to invoke still relies on LLM reasoning, executing the tool itself as a structured function call enables faster, more token-efficient operations, though it requires the site or platform to define tools.

Focusing on the public web before authentication, this post explores the role and technical limits of each of these four mechanisms, the new bot verification and monetization models emerging at the edge, and what you can do on your website today.

Simple URL fetching and Markdown conversion #

The lightest and most fundamental mechanism is used by search integrations, retrieval-augmented generation (RAG), and the research features of coding agents. These tools send an HTTP GET request directly to a URL through fetch or similar HTTP clients and extract the main text from the response.

Even when an HTTP response is returned, HTML built for human browsers contains large amounts of layout <div> elements, navigation menus, ads, and inline scripts. Feeding this HTML directly into an LLM's context window wastes a large number of tokens on markup that has nothing to do with the core content.

To eliminate this structural waste, Markdown delivery—serving different formats from the same URL based on request headers—is spreading. With Cloudflare's Markdown for Agents, for example, when an agent sends a request with the Accept: text/markdown header, the edge automatically converts the HTML into clean Markdown. In that post, that cut token usage by about 80% (from 16,180 to 3,150 tokens). If your origin or CDN serves both HTML and Markdown from the same URL, make sure to set the Vary: Accept response header so that caches never serve Markdown to human visitors' browsers by mistake.

Currently, only a subset of agents such as Claude Code and OpenCode send Accept: text/markdown; most crawlers still request standard HTML.

However, because this approach only retrieves static HTTP responses, it can't execute client-side JavaScript. It has a clear limitation: it can't read content rendered dynamically by an SPA or perform interactive operations such as entering search criteria or clicking buttons.

Headless browser rendering for dynamic pages #

To read modern web applications rendered by client-side JavaScript, such as SPAs, agents launch an actual browser engine, render the page, and extract the resulting DOM or text.

Running general-purpose Chromium instances with Playwright or Puppeteer has been the standard setup in this area, but when an agent opens many pages in parallel, the memory and CPU consumed by each instance becomes a heavy burden. To address this, Cloudflare built Kitesurf, a browser focused not on speed, but on memory and CPU efficiency when running at high parallelism. Kitesurf is an ephemeral browser that runs on Cloudflare Workers V8 isolates, which spin up lightweight, isolated execution environments inside a single JavaScript engine instead of booting a full OS or container. By focusing on data extraction for compatible sites rather than full Chromium rendering compatibility, Kitesurf takes a little under twice as long per page compared to a warm pool of Chromium instances, while reducing memory consumption to roughly one-fifth to one-seventh and CPU usage to roughly one-third to one-quarter.

Autonomous UI operation with browser use and its limits #

Approaches that go beyond reading information and autonomously perform actions—such as selecting dates, clicking a search button, switching filters, and filling out forms to complete a task—are generally called browser use (autonomous browser operation).

To clarify the terminology: "browser use" (or "computer use," a term popularized by Anthropic) is used as a general term for the category of technologies in which AI agents autonomously operate screens and browser UIs. At the same time, a widely used open-source Python framework in this category is itself named browser-use, so the term appears with both meanings depending on context. In practice, open-source SDKs such as browser-use and Browserbase's Stagehand, as well as commercial agents such as OpenAI's ChatGPT Agent, Anthropic's Claude in Chrome, and Google's Auto Browse in Gemini in Chrome (available in select regions), implement this autonomous operation loop.

The basic mechanism is simple. Running in a virtual browser in the cloud, a browser built into a desktop app such as ChatGPT or Claude, or the user's everyday browser (including through Playwright or a browser extension), the agent captures the current state of the screen—either visually through screenshots or as an indexed list of interactive elements extracted from the DOM and accessibility tree. The LLM then decides which element to click next and what to type, executes the action, and observes the updated screen, repeating this loop. Its biggest strength is that even if your service offers no dedicated API or CLI, an agent can theoretically complete any task as long as a human can perform it on screen. (Whether the agent runs in the cloud or in a local built-in browser directly affects how authentication and cookies are handled, so each vendor's specific setup is covered in a separate post.)

However, this approach of operating a human-oriented interface from the outside by trial and error runs into three walls in production: responses become extremely slow because large DOM trees or high-resolution screenshots are sent to the LLM for every action, token consumption and inference costs soar, and minor design changes or a single pop-up on the site can easily break the operation. In fact, according to Stripe's benchmark on a test checkout store, baseline browser interactions without WebMCP consumed an average of about 1.8 million tokens, about 39 tool calls, and more than two and a half minutes to complete a single checkout.

Structured tool calling with WebMCP #

WebMCP aims to significantly reduce the inefficiency of agents guessing that some pixels or DOM nodes are probably a search button, using a standard browser JavaScript API. Instead of standing up a separate remote MCP server or external API on the backend, the web page open in the browser exposes the structured tools available on that page directly to agents through frontend JavaScript.

Using the imperative API, document.modelContext.registerTool(), you register a tool name, a natural-language description, input parameters defined in JSON Schema, and a JavaScript callback that runs when the tool is invoked.

if ('modelContext' in document) {
  await document.modelContext.registerTool({
    name: 'search_products',
    description: 'Search products by keyword and maximum price',
    inputSchema: {
      type: 'object',
      properties: {
        query: { type: 'string' },
        maxPrice: { type: 'number' },
      },
      required: ['query'],
    },
    async execute({ query, maxPrice }) {
      const results = await runCatalogSearch(query, maxPrice);
      return JSON.stringify(results);
    },
  });
}

By combining registration with feature detection ('modelContext' in document), you can adopt WebMCP safely as a progressive enhancement without affecting unsupported browsers.

WebMCP also lets you experiment in Chrome's origin trial with the declarative API, which turns existing HTML <form> elements into tools by adding toolname and tooldescription attributes (and is used alongside imperative tools in experiments such as Stripe's below). In the W3C specification, however, PR #338 moved the declarative API into an explainer for now, prioritizing standardizing and shipping the imperative API first.

Support is starting to expand on both sides of the ecosystem. On the browser side, the WebMCP API is rolling out across Chrome (where an origin trial started in Chrome 149), Edge, and an experimental implementation in Firefox, and support has also launched in Cloudflare's remote browser Kitesurf. On the agent side that consumes those tools, Google has announced upcoming support in Gemini in Chrome, while the ChatGPT desktop app's built-in browser (Site tools) already supports it.

Early results and real-world rollouts are also emerging. Centered on a design that exposes only the tools that are currently actionable as the payment session progresses, Stripe brought its suite of Checkout UIs to WebMCP without requiring code changes from merchants. In that test store, this reduced token consumption by 42%, cut processing time by 39%, and reduced tool calls by 38% compared to browser interactions without WebMCP. Platforms are also enabling WebMCP at scale, including built-in support across all storefronts and checkouts in Shopify's Fall '26 Edition, and Cloudflare's one-switch WebMCP feature that automatically injects a WebMCP bridge at the edge without modifying origin code—which Commerce.com adopted to roll out WebMCP across nearly 100,000 stores at once.

Bot verification and monetization at the edge #

Traditional bot defenses are becoming harder to rely on as sites field traffic from AI agents. robots.txt (RFC 9309), built for search and training crawlers, does not always apply to user-triggered agent fetches, and checking User-Agent strings or IP ranges cannot tell malicious scrapers apart from legitimate AI agents acting for a user. Instead of blocking traffic across the board, new mechanisms are emerging at the edge to verify an agent's identity, charge for usage, or apply rate limits.

For example, Web Bot Auth uses RFC 9421 (HTTP Message Signatures) to attach cryptographic signatures to HTTP requests so that the edge can verify which agent operator sent the traffic. Alongside early adoption by platforms such as Cloudflare and Shopify, the protocol is being standardized in the IETF.

However, relying only on mechanisms like Web Bot Auth that require bots to identify their operator through signatures raises concerns about closed gatekeeping, where major sites allow only a few partner operators and selectively block emerging agents or independent tools. To address this, proposals such as Anonymous Bot Authentication apply MoLE (Moderation of unLinkable Endorsements)—a general-purpose foundation for anonymous rate limiting being explored as an alternative to CAPTCHAs—to bot authentication. Without revealing the identity of the bot or its issuer to the site, this approach uses techniques such as zero-knowledge proofs to show only that a request carries a rate-limited token issued through a trusted channel, aiming to deter abuse while preserving the anonymity of the open web.

On the monetization front, the x402 protocol—which combines the HTTP 402 Payment Required status code with automated payment via stablecoins and other methods so publishers can request micropayments from agents for each content or API fetch—is taking shape under the Linux Foundation's x402 Foundation. While helping drive the specification and adoption, Cloudflare is also building out Monetization Gateway and Cloudflare Wallet to turn its vision of an Agentic Internet economy into reality.

What you can do today #

Building on these mechanisms and the shifts happening at the edge, you can take practical steps today as an extension of your everyday frontend development and delivery configuration, without building a dedicated agent API or MCP server from scratch.

Revisit bot defenses and content delivery #

The first step is to reconsider, content by content, whether letting AI agents access your pages creates value for your service. While robots.txt helps manage search and training crawlers, continuing to block even user-initiated agents across the board means giving up user experiences that would otherwise connect with your service. For text-heavy pages such as blogs and documentation where you welcome agent reading, optimizing delivery with Accept: text/markdown and Vary: Accept is a practical option—paired with considering how to balance openness and access control through verification mechanisms such as Web Bot Auth.

Use semantic HTML and accessible markup #

For pages and agents that don't use WebMCP yet, standard, semantic HTML remains the most reliable foundation. Properly associating <label> elements with input controls, using button text with a clear purpose, and keeping native <form> structures directly improve the quality of the accessibility tree that many browser-use agents rely on internally. In addition, minimizing layout shifts (CLS) helps prevent vision-based agents—which determine click targets from screenshot coordinates—from clicking the wrong element.

Build "agent-ready" sites and adopt WebMCP incrementally #

To check how AI agents see your website, you can use the Agentic browsing category in Lighthouse in Chrome DevTools (Chrome 150 and later), as well as public scanners such as Cloudflare's isitagentready.com and Vercel's is-agentic.com. Because each tool focuses on different criteria, you can adopt the checks that fit your site's architecture and gradually expose document.modelContext.registerTool() on frequently used flows—such as product search, inventory or availability checks, and filtering—to reduce scraping-related errors and high costs. To validate the schemas of registered tools and test their execution locally, use the WebMCP debugging guide for Chrome DevTools and the Model Context Tool Inspector extension.

Conclusion #

APIs, CLIs, and remote MCP servers aren't the only ways to open your service to AI agents. Approaches that target the website itself have also broadened, from simple HTML fetching and Markdown delivery, to headless browser rendering, to browser use that operates screens autonomously, and finally to WebMCP, where the page itself exposes structured tools.

A defining characteristic of these technologies is that alongside browser standardization at the W3C, platforms such as Cloudflare, Shopify, and Stripe are driving standardization at the IETF as well as large-scale implementation and adoption. Getting content delivery and semantic HTML in order, and gradually exposing tools on key user flows with WebMCP, remains the most reliable first step toward building a web service that works well for both human users and AI agents.

However, everything covered so far focuses on the public web before authentication. When a user asks an agent to "book a trip with my saved miles" on a travel service they're not signed in to, or to "start a return" from their order history on an e-commerce site, how does the AI agent actually sign in to your website safely? The next post dives into agent-driven sign-in approaches.