推出面向智能体的搜索

AI Search 是我们的服务,它为你的内容建立索引,让你无需构建整套检索基础设施,就能为任何应用或智能体添加搜索能力。一段时间以来,它已经支持将你的网站添加为数据源,自动抓取、转换并索引其页面。
不过,为你的网站搭建 AI Search 实例,起初仍需手动创建和配置,之后还要完成所有集成工作,才能让搜索端点可从你的域名访问,并确保智能体知道去哪里找到索引、知道如何使用它。
今天,我们推出 Search for Agents,把上述设置简化为 Cloudflare 仪表盘中的一个开关。为你的 zone 打开它,我们的服务就会创建你的 AI Search 实例、开始为你的内容建立索引,并让搜索可从你自己的域名被发现和访问。
这一思路自然延续自 Markdown for Agents——对于已启用的 zone,Cloudflare 网络会使用内容协商头,实时将任何 HTML 页面转换为 Markdown。同样,Search for Agents 利用 AI Search 的能力,自动为你的 zone 创建索引,并开放 API,让任何 AI 智能体都能发现并使用这些 API,在你的域名下搜索你的网站,而这一切都在网络层完成。
你可以通过 API 启用 Search for Agents,也可以在 zone 页面的仪表盘中,于“快捷操作”(Quick Actions)下启用:
Search for Agents 面向所有客户开放,包括 Free 套餐(有额度限制)。启用后,Cloudflare 会自动创建 AI Search 实例,开始抓取并索引你 zone 中的内容。关于抓取流程如何运作,请参阅我们的开发者文档。
你可以直接从此页面访问你的实例,也可以直接前往账户的 AI > AI Search 实例视图:
你所在区域的 AI Search 实例会以默认设置创建,但你可以随时启用重排序(reranking),或更改缓存设置等配置选项。完整选项列表请参阅我们的文档。
一旦 AI Search 为你的内容建立索引,你或互联网上的任何智能体都可以开始使用 Search for Agents,但需遵循你的域设置(例如你的机器人管理设置、AI Crawl Control 以及 Web 应用防火墙(WAF)配置)。
如果智能体不知道搜索的存在,搜索就没什么用处。为便于被发现,Search for Agents 会自动在你网站的每个页面上公布搜索端点。
例如,对于 HTML 响应,我们会在页面的 <head> 中添加元数据:
<meta name="agent:instructions" content="Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."> <meta name="agent:endpoint" content="https://developers.cloudflare.com/.well-known/search?q={query}"> <meta name="agent:method" content="GET"> <meta name="agent:documentation" content="https://developers.cloudflare.com/ai-search/how-to/search-for-agents/">如果你还启用了 Markdown for Agents,那么以 Accept: text/markdown 请求某个页面的智能体将在 YAML front matter 中收到相同的信息:
--- agent: instructions: "使用此搜索 API,通过关键词或自然语言查询在本站点内查找相关内容,而无需逐个爬取页面。结果以 Markdown 返回。" endpoint: "https://developers.cloudflare.com/.well-known/search?q={query}" method: "GET" documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/" --- 智能体会轻松读到这些指令,并知道接下来该怎么做来搜索你的站点。
一旦智能体知道你的站点有一个搜索端点,它就可以开始使用它:
$ curl "https://developers.cloudflare.com/.well-known/search?q=cloudflare+artifacts" # Search results for: "cloudflare artifacts" ## docs/artifacts/api/workers-binding/index.md (score: 1.000) # Workers binding · Artifacts · Cloudflare Artifacts docs Call Artifacts from a Worker binding. --- ## docs/artifacts/index.md (score: 0.951) # Artifacts · Cloudflare Artifacts docs Store, version, and share filesystem artifacts across Workers, APIs, and Git-compatible tools. ... 根据你的 AI Search 配置,智能体还可以使用自然语言,向该搜索端点提问:
$ curl --get "https://developers.cloudflare.com/.well-known/search" --data-urlencode "q=What is the maximum push size for Cloudflare Artifacts?" # 搜索结果:“Cloudflare Artifacts 的最大推送大小是多少?” ## docs/artifacts/platform/limits/index.limits-cloudflare-artifacts-docs.md(得分:1.000) # 限制 · Cloudflare Artifacts 文档 章节:限制 · Cloudflare Artifacts 文档 title: 限制 description: 查看 Artifacts 平台限制。 pcx_content_type: reference products: - artifacts 以下是适用于创建、导入、克隆和推送 Artifacts 的限制。这些限制涵盖命名规则、存储、控制平面和 Git 操作的请求速率,以及每次推送的大小。 | 功能 | 限制 | | --- | --- | | 控制平面请求速率 | 每个 Artifacts 命名空间每 10 秒 2,000 个请求 | | Git 请求速率(每个 Artifact) | 每个 Artifact 每 10 秒 2,000 个请求 | | 每个仓库的最大存储空间 | 对于在 2026-09-29 或之后创建的仓库为 1 GB。更早创建的仓库有 10 GB 限制。参见大小限制变更。 | | 每个账户的最大存储空间 | 1 TB(可应请求提高) | | 最大仓库数量 | 无限制 | | 最大命名空间数量 | 无限制 | | 命名空间名称长度 | 2–63 个字符 | | 命名空间和仓库名称 | 以字母或数字开头。其余字符可包含字母、数字、.、_ 和 -。 | | 最大推送大小 | 每次推送 64 MiB。包含推送中发送的所有数据。将较大的工作拆分为多次较小的推送。 | | 每次推送的最大对象数 | 50,000 个对象,例如文件版本、文件夹和提交。 | | 最大文件大小 | 每个文件 32 MiB。已压缩的文件,如图像、视频或 zip 归档,可能在略低于 32 MiB 时被拒绝。 | | 每次推送的最大 ref 更新量 | 每次推送的分支和标签更新为 1 MiB。 | | 每个文件夹的最大条目数 | 单个文件夹中 100,000 个文件和子文件夹。 | ... 请注意,此搜索端点返回检索到的 Markdown 内容,而不是生成的答案。智能体已经拥有 AI 模型和与用户的对话;它只需要来自你站点的相关信息,而不是另一个 AI 模型替它尝试回答。
新的 HTTP QUERY 方法是一项 IETF 拟议标准(Proposed Standard),由我们自己的 James Snell 参与共同撰写,于 2026 年 6 月作为 RFC 10008 发布。QUERY 允许客户端在请求体中安全且幂等地发送搜索条件,而不会修改服务器状态。这使它非常适合 AI 搜索。
QUERY 的采用正在推进:主要浏览器厂商正在讨论该 RFC,多个框架和客户端要么已经采用(例如 curl 和 undici),要么正在讨论采用。
Search for Agents 原生支持 QUERY,既可使用纯文本请求体,也可使用 JSON 请求体:
# Plain text curl -X QUERY 'https://developers.cloudflare.com/.well-known/search' \ --data 'What is the maximum payload size per ingestion request in Basin Pipelines?' # JSON curl -X QUERY 'https://developers.cloudflare.com/.well-known/search' \ --header 'Content-Type: application/json' \ --data '{"q":"How many bulk import requests per minute does Email Service allow?"}'实际演示让我们看看它在一次智能体会话中的实际表现。Search for Agents 已为我们的开发者文档启用。当我们打开一个 OpenCode 会话并询问“Cloudflare Artifacts 的最大推送大小是多少?”时,在日志中可以看到智能体在首页发现了搜索端点,随后带着这个问题请求 /.well-known/search 以获取搜索结果。
几秒钟后返回答案,而且答案是正确的。
一旦智能体发现了搜索 API,它很可能在同一会话中每当需要搜索同一站点的内容时就会反复复用它。
在此次发布之前,我们已经为开发者文档启用了 Search for Agents,我们发现智能体在发现搜索 API 并在任务中使用它方面表现良好。
由于 Search for Agents 由你账户中的 AI Search 实例提供支持,因此你也能获得所有标准配置选项和功能。例如,你可以启用公开的 REST API 或 MCP 端点,或从 Workers 中调用它,甚至可以将 AI Search 嵌入你的网站供人类访客使用。
从今天起,Search for Agents 面向所有客户开放。其用量遵循 AI Search 的定价,包括内容摄取、索引内容存储和查询服务,并受账户在 Workers 免费版和付费版中所包含的用量与限额约束。
我们还建议你查看我们的 Agent Readiness 页面(见公告),了解如何让你的网站针对智能体进行优化——从指导智能体如何认证,到控制智能体能看到哪些内容、以何种格式接收内容,以及如何为其付费。
原文较长,译文为节选;译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Introducing Search for Agents)
AI Search, our service that indexes your content and lets you add search to any application or agent without having to build an entire retrieval infrastructure, has supported adding your website as a data source for a while now, automatically crawling, converting and indexing its pages.
Still, setting up an AI Search instance for your website requires manually creating and configuring it initially, and then doing all the integration work to get the search endpoints available from your domain and to make sure that agents know where to find the index and know how to use it.
Today we're introducing Search for Agents, which puts that setup behind a toggle in your Cloudflare dashboard. Turn it on for your zone, and our service will create your AI Search instance, start indexing your content, and make search discoverable and available from your own domain.
How it works
The idea follows naturally from Markdown for Agents, where Cloudflare's network converts any HTML page to Markdown in real time for enabled zones using content negotiation headers. Similarly, Search for Agents leverages the power of AI Search by automatically creating an index for your zone and exposing APIs that any AI agent can discover and use to search your website, under your domain, all done at the network level.
You can enable Search for Agents using the API, or by going to the dashboard in your zone page, under Quick Actions:
Search for Agents is available to all customers, including Free (with limits). Once it’s enabled, Cloudflare will automatically create an AI Search instance, start crawling and indexing the content in your zone. Refer to our developer documentation to understand how the crawling process works.
You can access your instance directly from this page, or by going to directly to your account’s AI > AI Search instances view:
The AI Search instance for your zone is created with default settings, but you can enable reranking or change configuration options like cache settings at any time. Refer to our documentation for the full list of options.
Once AI Search indexes your content, you or any agent on the Internet can start using Search for Agents, subject to your domain settings (e.g. your bot management settings, AI Crawl Control and web application firewall (WAF) configurations).
Discoverability
Search isn't much use if the agents don’t know it's there. To facilitate discoverability, Search for Agents automatically advertises the search endpoint on every page of your site.
For example, for HTML responses, we add metadata to the page's <head>:
<meta name="agent:instructions" content="Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown.">
<meta name="agent:endpoint" content="https://developers.cloudflare.com/.well-known/search?q={query}">
<meta name="agent:method" content="GET">
<meta name="agent:documentation" content="https://developers.cloudflare.com/ai-search/how-to/search-for-agents/">If you also have Markdown for Agents enabled, an agent requesting a page with Accept: text/markdown receives the same information in YAML front matter:
---
agent:
instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
endpoint: "https://developers.cloudflare.com/.well-known/search?q={query}"
method: "GET"
documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---The agent will easily pick up these instructions and know what to do next to search your site.
Searching content
Once the agent knows that your site has a search endpoint, it can start using it:
$ curl "https://developers.cloudflare.com/.well-known/search?q=cloudflare+artifacts"
# Search results for: "cloudflare artifacts"
## docs/artifacts/api/workers-binding/index.md (score: 1.000)
# Workers binding · Artifacts · Cloudflare Artifacts docs
Call Artifacts from a Worker binding.
---
## docs/artifacts/index.md (score: 0.951)
# Artifacts · Cloudflare Artifacts docs
Store, version, and share filesystem artifacts across Workers, APIs, and Git-compatible tools.
...Depending on your AI Search configuration, the agent can also use natural language and ask questions to the search endpoint:
$ curl --get "https://developers.cloudflare.com/.well-known/search" --data-urlencode "q=What is the maximum push size for Cloudflare Artifacts?"
# Search results for: "What is the maximum push size for Cloudflare Artifacts?"
## docs/artifacts/platform/limits/index.limits-cloudflare-artifacts-docs.md (score: 1.000)
# Limits · Cloudflare Artifacts docs
Section: Limits · Cloudflare Artifacts docs
title: Limits
description: Review Artifacts platform limits.
pcx_content_type: reference
products:
- artifacts
Limits that apply to creating, importing, cloning, and pushing Artifacts are detailed below.
These limits cover naming rules, storage, request rates for control-plane and Git operations, and the size of each push.
FeatureLimitControl-plane request rate2,000 requests per 10 seconds per Artifacts namespaceGit request rate, per artifact2,000 requests per 10 seconds per artifactMaximum storage per repository1 GB for repos created on or after 2026-09-29. Repos created earlier have a 10 GB limit. See size limit change.Maximum storage per account1 TB (can be raised on request)Maximum number of repositoriesUnlimitedMaximum number of namespacesUnlimitedNamespace name length2–63 charactersNamespace and repo namesStart with a letter or digit. Remaining characters may include letters, digits, ., _, and -.Maximum push size64 MiB per push. Includes all data sent in the push. Split larger work into several smaller pushes.Maximum objects per push50,000 objects, such as file versions, folders, and commits.Maximum file size32 MiB per file. Already-compressed files, like images, video, or zip archives, may be rejected slightly below 32 MiB.Maximum ref updates per push1 MiB of branch and tag updates per push.Maximum entries per folder100,000 files and subfolders in a single folder.
...Note that this search endpoint returns retrieved content, in Markdown, not a generated answer. The agent already has an AI model and a conversation with the user; all it needs is the relevant information from your site, not another AI model's attempt to answer on its behalf.
Supporting a new HTTP method: QUERY
The new HTTP QUERY method is an IETF Proposed Standard, incidentally coauthored by our own James Snell, published in June 2026 as RFC 10008. A QUERY allows a client to send search criteria in a request body safely and idempotently without modifying server state. This makes it a good fit for AI search.
The adoption of QUERY is underway with major browser vendors discussing the RFC and multiple frameworks and clients either adopting (curl and undici, for example), or discussing adoption.
Search for Agents supports QUERY natively either using a plain text or JSON request body:
# Plain text
curl -X QUERY 'https://developers.cloudflare.com/.well-known/search' \
--data 'What is the maximum payload size per ingestion request in Basin Pipelines?'
# JSON
curl -X QUERY 'https://developers.cloudflare.com/.well-known/search' \
--header 'Content-Type: application/json' \
--data '{"q":"How many bulk import requests per minute does Email Service allow?"}'See it in action
Let’s see it in action during an agentic session. Search for Agents is enabled for our Developer Documentation. When we open an OpenCode session and ask “What is the maximum push size for Cloudflare Artifacts?”, in the logs we can see the agent discovering the search endpoint on the homepage and then fetching /.well-known/search with the question for the search results.
The answer comes back a few seconds later and it’s correct.
Once the agent discovers the search API, it will likely reuse it multiple times within the same session whenever it needs to search for content in the same site.
We enabled Search for Agents for our developer documentation ahead of this announcement and we’ve found that agents do a good job of discovering the search API and using it during their tasks.
It’s still an AI Search instance
Because Search for Agents is powered by an AI Search instance in your account, you get all the standard configuration options and features as well. For example, you can enable public REST API or MCP endpoints, or use it from Workers, or even embed AI Search on your website for human visitors.
Start using Search for Agents
Starting today, Search for Agents is available to all customers. The usage follows the AI Search pricing; that includes ingesting content, storing the index's content, and serving queries, subject to the account's included usage and limits for both the Workers Free and Paid plans.
We also recommend you check our Agent Readiness page (see announcement) and understand how you can make your sites optimized for agents, from guiding agents on how to authenticate, to controlling what content agents can see, the format they receive it in, and how they pay for it.
Check out the Search for Agents developer docs for more information. Follow us on X or come and talk to us in the Cloudflare Developer Discord. We'd like to hear from site owners making their content searchable to agents.
正文保留英文原文,标题与摘要由机器翻译。
原文发布于 Cloudflare Blog(Introducing Search for Agents),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。