PARAS MADAN
All writing

Latest in AI

Cloudflare Search for Agents: How to Test What Your Site Returns

Set up the public search endpoint, then test which pages it retrieves and whether old details stay in the results.

A developer asks an assistant which versions of your API still support an old endpoint. If your new search surface finds a six-month-old migration note above the current reference, the assistant now has a faster way to get the wrong answer.

Cloudflare's November 25 Search for Agents beta adds an indexed search endpoint at /.well-known/search. I'd judge it on the quality of the excerpts it returns, not the presence of a new URL.

Use the right feature for the question

Search for Agents retrieves chunks across indexed pages and returns them as Markdown with source information. It does not generate the answer. Markdown for Agents serves a Markdown version of a page the caller already knows. They solve two different problems: finding the URL and reading it.

Neither feature tells you that a particular assistant will start using the endpoint. Cloudflare advertises it in the site's HTML and, when the Markdown feature is also enabled, in the converted page. Whether a caller discovers it and uses it is a separate question.

Decide what should be discoverable first

An onboarded domain can turn it on from its Overview under Quick Actions. The toggle creates an AI Search instance and starts indexing, so review the defaults and plan terms before confirming. Start on a docs host that contains information you already intend to publish. Don't count on "we never link to that URL" to keep a public page private.

Cloudflare documents Discover crawling through links and sitemaps, with subdomain discovery off by default. Review the instance's crawl behavior and actual returned sources. Keep private documents behind the access controls you already rely on, and test that synthetic placeholders for internal pages don't appear. Search requests are still subject to your AI Crawl Control and WAF settings; don't relax them merely to make a test pass.

Try questions with a known correct source

After the index is populated, run a request against a domain you control:

curl --get "https://docs.your-domain.test/.well-known/search" \
  --data-urlencode "q=Which API versions support batch exports?"

Replace the host. Try one exact name, one paraphrase, one recently changed fact, and one question the site cannot answer. For each, write down the expected page before looking at the returned excerpts. A high relevance score on a stale page is still bad retrieval. Notice when several chunks from the same old page fill the response.

Separate crawl lag from query caching

Cloudflare documents a 24-hour default sync interval and a default similarity cache lasting 48 hours. Those are separate settings. If a newly updated page doesn't show up, inspect the source and index first, then compare what closely related queries return. Document the difference between when a page changed, when the index picked it up, and when users started seeing the new passage. Don't turn either default into a promise about content freshness.

Watch the bill alongside the results

The beta is available on all plans, but ingestion, index storage and queries remain subject to AI Search pricing and limits. Measure one docs section before indexing a large site. Track whether the expected source appears near the top, how often outdated text is returned, and how much the pilot costs. An indexed endpoint can be a useful route into your content even if no chatbot surfaces it by name.

I help AI teams turn technical changes into guides their customers can use. Book a 30-minute call.