BuildRiot
Sign in

Article · AI

How to test Cloudflare Search for Agents on a documentation site

Cloudflare’s Search for Agents gives websites a discoverable search endpoint that returns Markdown. This guide explains how to compare it with an agent’s existing browsing workflow, measuring discovery, retrieval quality, freshness, answer accuracy and cost.

A colorful miniature scene compares two documentation search paths, with paper results examined under a magnifying glass beside a leaf and coins.
Illustration: BuildRiot (AI-generated)

Key takeaway

A working search endpoint does not guarantee a better documentation answer. Measuring discovery, evidence quality and final answers separately helps developers distinguish accuracy gains from efficiency improvements and freshness trade-offs.

A discoverable endpoint creates a testable claim

Cloudflare launched Search for Agents on November 25, 2026, giving websites a discoverable endpoint that returns retrieved Markdown. A domain-level toggle creates an AI Search instance, indexes website content and exposes /.well-known/search. Searches accept keywords or natural-language questions, and responses contain retrieved content rather than generated answers. The feature is in beta and available across all plans for domains onboarded to Cloudflare. Sources: Cloudflare

Cloudflare said it enabled the feature on its developer documentation before launch. Its demonstration showed OpenCode discovering the endpoint and reportedly answering a Cloudflare Artifacts push-size question correctly within seconds. Marc Winer’s MACCUS analysis also reported discovery tags and successful responses containing Markdown and scores. Neither account offers a controlled answer-quality comparison, and Cloudflare’s demonstration gives no trial count or representative discovery-success rate. The proposed experiment below tests whether discovery leads to better evidence and better answers. Sources: Cloudflare, Maccus

Freeze the site and separate three conditions

Start with a maintained documentation site whose repository and deployment logs identify the exact content under test. Record page count, languages, product versions, sitemap coverage and indexing completeness. Include a controlled section with newly written facts to reduce reliance on memorized knowledge. Keep the agent, model version, system prompt, browsing tools, token budget and time limit fixed. Start every run in a fresh session.

Use the proposed conditions in the table below to separate ordinary adoption from retrieval capability. Enforce the baseline through the test harness by blocking endpoint access and recording attempts. Preserve ordinary search and fetching in the other conditions so fallback remains measurable. Keep HTML and Markdown delivery identical across the principal comparison, and test delivery-format changes separately.

Table

Three proposed conditions for the same agent

ConditionEndpoint accessTask hintPurpose
A: Existing browsingBlocked by harnessNoneEstablish current performance
B: Discoverable searchEndpoint and metadata availableNoneMeasure ordinary adoption and benefit
C: Explicit endpointEndpoint and metadata availableEndpoint location suppliedEvaluate retrieval after discovery
The explicit-endpoint condition helps explain whether discovery limits the practical benefit.

Record both the raw landing-page response and the representation visible to the model. Cloudflare documents agent:search metadata in HTML and corresponding metadata in Markdown responses when Markdown for Agents is enabled. Treat metadata visibility as a checkpoint between page delivery and endpoint use. Before running questions, verify endpoint availability with the request below, adapted from Cloudflare’s changelog. A successful response alone earns no retrieval or answer-quality credit. Sources: Cloudflare

curl --get 'https://YOUR-DOCS-DOMAIN/.well-known/search' \
  --data-urlencode 'q=How do I verify webhook signatures?'

Build questions that expose different failure modes

Build a pilot with repeated fresh-session runs for each question and condition. Randomize condition order within each question block, reserve separate development questions for tuning and freeze settings before scoring. For every scored question, store required facts, acceptable evidence passages, canonical URLs, version constraints and plausible misleading answers. Divide questions evenly across the following groups.

  • Exact identifiers, flags, error codes and API parameters
  • Natural-language paraphrases with little vocabulary overlap
  • Procedures requiring evidence from multiple pages
  • Version-specific questions with obsolete distractors
  • Questions about newly changed documentation
  • Unanswerable or insufficiently documented questions

Score retrieval and final answers separately, using the proposed measurements below. Preserve ranked results and evaluate both chunks and unique pages so overlapping passages do not inflate source coverage. Blind answer reviewers to the condition, checking units, prerequisites, version labels and unsupported additions. Keep prompt-injection defenses identical across conditions. Score controlled adversarial documents separately from ordinary documentation tasks.

Table

Proposed measurements from discovery to answer

DimensionMeasurementScoring distinction
DiscoveryValid unhinted endpoint queries divided by all B runsInclude failures to discover
Discovery diagnosisPage visit, metadata visibility, recognition, request and useLocate the failed step
RetrievalReference-page hit@5 and hit@10; required-evidence recallScore chunks and unique pages
RankingMean reciprocal rank; normalized discounted cumulative gainUse blinded relevance labels
FreshnessElapsed time from verified deploymentSeparate retrieval from cited answer
CorrectnessRequired facts, version errors, unsupported claims and abstentionScore independently of citations
Citation precisionSupported cited claims divided by cited claimsCheck the cited passage
Citation completenessMaterial factual claims with supporting citations divided by all material factual claimsDetect missing evidence
Efficiency and reliabilityLatency, tokens, costs, failures and fallback successRetain unsuccessful runs
Keep endpoint use, evidence quality and final citation support as separate scores.

Adjacent benchmarks illustrate why navigation and accuracy need separate measures. Mintlify’s vendor-run documentation benchmark reported mean failed page requests of 2.23 for HTML, 1.42 for Markdown and 0.11 for Markdown linking to llms.txt. Answer accuracy remained in the mid-to-high 90s. Firecrawl’s vendor-run DevDex uses fixed reference answers and deterministic citation matching. Its Recall@10 measures the agent’s first ten citations rather than retrieved results alone. Both benchmarks evaluate approaches other than Search for Agents. Sources: Mintlify, Firecrawl

Measure freshness from deployment to cited answer

Cloudflare’s launch guide lists a 24-hour crawl cache age, a 24-hour sync interval and a 48-hour similarity cache. Its syncing documentation allows scheduled intervals from 15 minutes to 24 hours and event-triggered syncs with a 30-second cooldown. Website syncs still follow recrawl rules. These settings do not establish a guaranteed freshness deadline. Cloudflare’s documentation does not specify whether every relevant index update invalidates similarity-cache entries. Sources: Cloudflare

Publish controlled changes covering a new page, numerical correction, changed command, deprecation, moved page and deletion. Use fictional product values where changing real guidance would mislead readers. Test the default configuration first, then run separate cache-disabled and deployment-triggered-sync comparisons. Follow the sequence below, measuring new information becoming retrievable separately from obsolete information disappearing.

  1. Preserve the old answer and prewarm selected queries before publication.
  2. Record deployment time and verify the public page body and hash.
  3. Poll direct pages and search results at identical intervals.
  4. Test repeated wording and fixed paraphrases separately.
  5. Record crawler observations, indexing completion and first fresh retrieval.
  6. Run the agent question and record the first correct answer with supporting citations.

Keep changes that remain stale at the observation cutoff in the report as unresolved cases. Avoid random query strings as a supposed cache bypass; changing the query does not establish that semantic caching was bypassed. Report retrieval freshness and answer freshness separately. An updated passage earns only the first milestone: the agent must still use it correctly and cite it.

Account for configuration, failures and publisher costs

Save a settings snapshot alongside every run. Cloudflare’s guide specifies hybrid retrieval with Reciprocal Rank Fusion, a maximum of 10 chunks and a 0.4 threshold. Chunks contain 1,024 tokens with 10% overlap; query rewriting and reranking are disabled. Discover-mode crawling has a 100,000-page ceiling, follows up to five link hops and excludes subdomains. The endpoint remains subject to AI Crawl Control and web application firewall configuration. Classify access blocks separately from empty or irrelevant results. Sources: Cloudflare

Record latency, tool calls, failed fetches, transferred bytes, model tokens and costs alongside answer scores. Cloudflare says billing begins December 1, 2026. Monthly account allowances include 5 million ingestion tokens, 10 GB-month of storage, 1,000 semantic queries and 1,000 full-text queries. Beyond included usage, hybrid queries cost $0.75 per 1,000; ingestion and storage are billed separately, and chunk overlap counts toward ingestion. At that rate, 100,000 monthly hybrid queries would incur $74.25 in query charges after an otherwise-unused 1,000-query allowance. That calculation excludes ingestion, storage and the answering agent’s costs. Sources: Cloudflare

Judge ordinary behavior before diagnosing failures

Pre-register two principal outcomes: fully correct answers with adequate citations, and total task cost or latency. Report the discoverable condition across all runs first, including those where the agent never finds the endpoint. Use paired differences with uncertainty intervals clustered by question, because repetitions of one question are not independent questions. Then use the explicit-endpoint condition to distinguish a discovery problem from weak retrieval.

If accuracy stays flat while requests and tokens fall, describe an efficiency improvement. If explicit endpoint access succeeds while ordinary discovery fails, prioritize integration work. If direct pages reflect changes sooner than search, report that freshness trade-off alongside other gains. Claim stronger answer quality only if the discoverable condition improves correct, adequately cited answers within the same budget. Limit that claim to the tested agent, site and configuration.

Publish the question set, reference evidence, site revision, configuration, model identifier, prompts, raw tool traces and scoring rubric. Preserve failures and identify search-engine coverage differences or external-service changes during the run. Use that record as a repeatable acceptance test when the documentation, retrieval settings or agent changes.

Attribution

Sources

  1. 1CloudflareSearch for Agents
  2. 2CloudflareChangelogs
  3. 3CloudflareIntroducing Search for AgentsSource published (UTC)
  4. 4CloudflareSyncing
  5. 5CloudflareLimits & pricing
  6. 6MaccusCloudflare's Search for Agents can cost you money without sending you visitors
  7. 7MintlifyHow to make your documentation agent-friendly
  8. 8FirecrawlDevDex: Developer retrieval benchmark

Read the original source for full details and context.

Report a problem

Links, dates or what you expected. Do not include passwords or private data.

More on AI

All AI stories
How to test Cloudflare Search for Agents on a documentation site · BuildRiot