- Cloudflare's Search for Agents (beta since 25 November) puts a search endpoint at
/.well-known/searchon your domain and advertises it at the top of every page. Cloudflare's own docs and blog already run it. One query returns 50 chunks of Markdown, about 41 to 62 KB, in roughly a second. - In 24 Claude Code runs on Haiku 5.5 and Sonnet 5.5, the agent fetched 48 Cloudflare docs pages that carried the hint and never used the endpoint once. The hint does arrive. WebFetch hands each page to a helper model that answers only the question it was asked, so the main model never hears about it.
- One sentence naming the endpoint, in the prompt or in a project CLAUDE.md, got it used in 24 of 24 runs, with every answer correct. On the harder of my two questions it took Sonnet 5.5 from $0.034 to $0.040 a run down to $0.012 to $0.014, with no paid web search.
Cloudflare shipped Search for Agents on 25 November. You flip a toggle on your domain's Overview page, Cloudflare crawls the site into an AI Search index, and agents can query it at https://yourdomain/.well-known/search?q=.... The endpoint returns retrieved passages in Markdown, not a generated answer, so the agent's own model does the reading.
The discovery part is what's new. Cloudflare adds four <meta name="agent:..."> tags to the HTML head of every page. If Markdown for Agents is also on, a request with Accept: text/markdown gets the same thing as YAML front matter: an instructions line telling the agent to "use this search API" instead of crawling pages, the endpoint URL and the method. The idea is that an agent lands on any page and learns there's a faster way in.
I wanted to know whether that works on an agent people actually use, so I pointed Claude Code at Cloudflare's own docs.
What the endpoint returns
I sent nine queries to developers.cloudflare.com/.well-known/search, eight as GET and one with the HTTP QUERY method the guide also documents. Every response was text/markdown, came back in 0.8 to 1.4 seconds and held exactly 50 chunks. That's 41,084 to 62,076 bytes, or about 9,300 to 15,400 tokens by the cl100k tokenizer Cloudflare counts ingestion with. blog.cloudflare.com also returned 50. The setup guide lists 10 chunks as the default for new instances, so check what your own site sends before an agent pulls 60 KB per question.
The index was fresh. Two Rules changelog entries posted on 27 November were in the top three results the next morning.
The results are built for a model to read, not for anyone to cite. Each one is headed by a repository-style path and a score, such as docs/stream/manage-video-library/using-webhooks/index.verify-webhook-authenticity.md (score: 0.950). The top result always scores exactly 1.000, so the scores rank results within one response and don't compare across queries. Eight of the 50 results for a webhook question had names like c.2e8f7f55...md, 64 hex characters that don't map to any URL. One Workers page section showed up four times in the same response.
The test
Claude Code 2.1.332 in headless mode (claude -p), tools limited to WebFetch and WebSearch, MCP servers, hooks and CLAUDE.md files off, three runs per cell on Haiku 5.5 and Sonnet 5.5. Two questions with checkable answers:
- Which header does Cloudflare Stream use to sign webhooks, and which algorithm? (
Webhook-Signature, HMAC-SHA256.) - Which Rules expression field matches response cookies by name? (
http.response.set_cookies, added on 27 November.)
Four prompt conditions. "Plain" asks the question and names developers.cloudflare.com. "Start" adds "Start at https://developers.cloudflare.com/", so the agent fetches a page that carries the hint. "Told" adds one sentence naming the search endpoint. "CLAUDE.md" puts that sentence in a project CLAUDE.md instead and leaves the prompt plain (my user CLAUDE.md loads in that condition too). That's 48 valid runs, about $0.63 at list prices, and all 48 answers were correct.
48 fetches, zero searches
In the plain and start runs the agent made 48 WebFetch calls to Cloudflare docs pages that carried the search metadata. All six Haiku start runs fetched the homepage, whose front matter opens with the search instructions. Not one of the 24 runs called the endpoint. Two Haiku runs went looking for /stream/llms.txt instead.
Claude Code isn't skipping the hint at the door. The 2.1.332 binary sends Accept: text/markdown, text/html, */* on every WebFetch, so Cloudflare serves the Markdown version with the front matter on top. I asked WebFetch about the homepage directly ("report anything the page says to AI agents") and its helper model quoted the instruction, the endpoint, the method and the documentation link word for word.
The gap is in the design of the tool. For a site like this one, WebFetch doesn't return the page to the main model. It gives the page plus the main model's question to a small helper model and returns only the helper's answer. Ask it which header signs Stream webhooks and you get the header. The note at the top of the page saying "there's a search API, use it" isn't part of the answer, so it's gone.
One sentence fixes it
Naming the endpoint was enough. In the told condition both models called /.well-known/search once in 12 of 12 runs, then usually fetched the page the best result pointed to. The CLAUDE.md line did the same, 12 of 12.
Whether that saves money depends on the question. On the new cookie field, plain Sonnet 5.5 took four to six turns, ran a web search each time and cost $0.034 to $0.040. Told, it took two or three turns, no web search, $0.012 to $0.014. On the Stream question Sonnet already knew where the page was, fetched it in one go for $0.007 to $0.013, and the endpoint only added a hop, $0.011 to $0.012.
Haiku 5.5 dropped from $0.014 to $0.018 per plain run to $0.003 to $0.004 told, apart from one told run that also ran a web search ($0.018). Most of that gap is the web search fee, $10 per 1,000 searches, so a cent each. The Haiku start runs that crawled from the homepage without web search cost $0.002 to $0.005 too. They just took up to six turns and five fetches to get there.
The search result is heavier for the helper model. A search response put 17,100 to 24,700 tokens into WebFetch's Haiku helper ($0.002 to $0.003), where the Stream webhook page took 4,800 ($0.0006 to $0.0007). The main model's context stayed about the same size either way, because it only ever sees the helper's summary.
Two traps from the setup
My first CLAUDE.md runs didn't load the file at all. Claude Code 2.1.332 skips a CLAUDE.md inside a session's scratchpad folder, and the only trace is a line in the debug log. Eight runs came back looking like "CLAUDE.md doesn't work" before I checked. I threw them out and reran from a folder outside the scratchpad.
My very first run had a worse problem. --tools WebFetch,WebSearch limits the built-in tools, not MCP tools, and this machine has 48 MCP servers configured. That run loaded 924 tools, sent 790,360 tokens on its first request, and stopped after three turns with "Prompt is too long", $0.80 at list price on Haiku 5.5. If you script claude -p, add --strict-mcp-config with an empty config.
What I'd do with this
If you use Claude Code against docs sites you visit often, add one line per site to CLAUDE.md. Something like: "Cloudflare docs: before fetching pages on developers.cloudflare.com, search the site with WebFetch on https://developers.cloudflare.com/.well-known/search?q=, then fetch the page the best result points to." That's the line I tested. Check first that the site has the endpoint. A plain GET with q=test tells you in a second.
If you run a site and turn this on, know who you're reaching. Agents that read raw pages, or that you've told about the endpoint, will use it. Agents that fetch through a summarizing helper, which includes Claude Code's WebFetch, will walk past the meta tags no matter how clear they are. Billing for AI Search starts on 1 December, with 1,000 hybrid queries a month included and $0.75 per 1,000 after that. Every query that does arrive pulls your instance's full chunk count, so set that number on purpose.
The same goes for any "instructions for agents" a site puts inside its pages. They have to survive whatever the agent's fetch tool does to the page. In Claude Code, that means they have to be part of the answer to the question the model asked. A site can't count on that.
What I didn't test
Interactive sessions, Opus and Fable, and other agents such as Codex, Cursor or Copilot, which may read pages differently. Sites that have Search for Agents but not Markdown for Agents, where only the HTML meta tags carry the hint and Claude Code converts the page with Turndown first. The site owner's side, since I don't have a zone with it turned on, and the 48-hour similarity cache. Answer quality beyond two questions and three runs per cell.


