跪拜 Guibai
← All articles
Agent · AI Programming · Artificial Intelligence

Cloudflare's Search for Agents Turns Your Site Into a Self-Advertising Search API for AI Agents

By 掘金安东尼 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Site owners can now give AI agents a first-class retrieval path without building or maintaining search infrastructure, and the cost is letting Cloudflare index every crawlable page on the zone. Whether this becomes more than a Cloudflare convenience depends on whether mainstream agent clients and other CDNs adopt the agent:* metadata convention, which is entirely Cloudflare-defined today.

Summary

Search for Agents removes the setup and integration work that previously kept AI Search from being a drop-in for websites. Flip a switch in the Cloudflare dashboard (or call the API), and the service creates an AI Search instance, crawls the zone, and places a search endpoint at /.well-known/search under your domain. Every page gets a set of meta tags (agent:instructions, agent:endpoint, agent:method, agent:documentation) that instruct agents to use the API instead of crawling; if Markdown for Agents is enabled, the same data appears in YAML front matter.

The endpoint returns retrieved Markdown snippets with relevance scores, not generated answers. Agents with their own language models use those snippets directly. The feature also natively supports the IETF's new HTTP QUERY method (RFC 10008), which puts queries in the request body while staying safe and idempotent, and it works with natural-language questions.

It's available to all customers, including free tier with usage limits, and billed under AI Search pricing for ingestion, storage, and queries. The Cloudflare developer docs already run it, and logs from an OpenCode session show an agent discovering the endpoint from the homepage and correctly answering a question about Artifacts limits in seconds.

Takeaways
— Search for Agents is a single toggle in the Cloudflare dashboard (or API call) that automatically creates an AI Search instance and starts crawling and indexing the zone's content.
— Every HTML page gets four meta tags (agent:instructions, agent:endpoint, agent:method, agent:documentation), and with Markdown for Agents enabled, the same data is put into YAML front matter.
— The search endpoint at /.well-known/search returns ranked Markdown snippets and source paths, not generated answers; the calling agent's own model composes the final response.
— The feature natively supports the HTTP QUERY method (RFC 10008, proposed standard, co-authored by Cloudflare's James Snell), which sends queries in the request body and preserves safe, idempotent semantics.
— Search for Agents is available to all customers including free tier, with usage billed at AI Search prices for content ingestion, storage, and queries.
— Search is subject to existing Bot Management, AI Crawl Control, and WAF rules, which can block agents or be loosened in ways that also affect page crawling.
— Site owners should verify which content is server-side rendered into HTML, since the crawler reads everything that's publicly crawlable, including content hidden only by frontend code.
— The Cloudflare developer docs run Search for Agents in production; an OpenCode demo showed an agent discovering the endpoint from the homepage and answering a question about Artifacts push limits correctly.
— The agent:* metadata is not tied to any formal standard; it's Cloudflare's own convention, and adoption by clients and other CDNs is unproven.
Conclusions

The discovery mechanism rests on Cloudflare-defined agent:* metadata with no standard behind it, so its long-term reach is limited by whether tools like Claude Code and Cursor explicitly honor it or rely on model judgment to parse instructions.

Returning raw snippets instead of generated answers keeps content ownership and formatting control with the site owner and avoids per-query generation costs, but table-heavy pages lose their structure in Markdown output, increasing the chance of misreading values like limits.

The QUERY method is a sound semantic fit for AI search, but middlebox reality (WAFs, proxies, enterprise egress) and browser inconsistency mean GET will dominate agent traffic for a while, with QUERY as an occasional supplement for long queries.

Search for Agents completes a Cloudflare pattern that turns the CDN into an agent access layer: Markdown for Agents handles format, AI Crawl Control handles access and payment, and Search for Agents handles retrieval, letting small sites get agent-ready without engineering effort.

The real threshold for success is whether the agent:* declaration becomes a de facto convention beyond Cloudflare; if only some models occasionally read it, it's a feature, not a standard.

Concepts & terms
AI Search
A Cloudflare service that indexes website content and provides a search API, returning ranked Markdown snippets. It removes the need to build and operate retrieval infrastructure.
Markdown for Agents
A Cloudflare feature that converts any HTML page into Markdown on the fly for agents that request with the Accept: text/markdown header, reducing token usage and noise.
HTTP QUERY method
An IETF proposed standard (RFC 10008) that lets clients send search criteria in the request body while preserving safe and idempotent semantics, suitable for long natural-language queries that would exceed GET URL limits.
Agent Readiness
A Cloudflare page and feature that checks how well a website is adapted for AI agents, covering authentication, content visibility, format, and payment for content.
AI Crawl Control
A Cloudflare feature that lets site owners manage which AI crawlers are allowed, including blocking, rate limiting, or requiring payment.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗