推出面向智能体的搜索
原题Introducing Search for Agents
读前速览
Cloudflare 推出「面向智能体的搜索」这一新功能,让 AI 智能体能够执行网页搜索,从互联网上获取最新信息,从而增强其能力。
推出「面向智能体的搜索」功能
Cloudflare 推出了一项名为「面向智能体的搜索」的新功能,让 AI 智能体能够执行网页搜索并从互联网上获取最新信息,解决了 AI 系统只能依赖训练数据的局限。
与 Cloudflare 现有的 AI 基础设施集成
该功能与 Cloudflare 更广泛的 AI 生态系统无缝集成,利用公司的全球网络和安全基础设施,为 AI 智能体提供快速、可靠的搜索能力,同时满足企业级安全标准。
满足实时获取信息的需求
该功能让 AI 智能体能够获取训练数据之外的新鲜、准确信息,从而给出信息更充分、结合上下文更紧密的回答。这对于需要最新数据的任务至关重要,例如市场分析、新闻监测或技术研究。
完整摘要
Cloudflare 宣布推出「面向智能体的搜索」这一新功能,让 AI 智能体能够执行网页搜索并获取实时信息。该功能与 Cloudflare 现有的 AI 基础设施集成,使智能体能够从网络获取最新数据,同时满足安全性和性能标准。这项进展回应了 AI 系统获取新鲜、准确信息的迫切需求,使其不再局限于训练数据,从而帮助 AI 智能体给出信息更充分、结合上下文更紧密的回答。
目录 · 7 节
AI Search 是一项服务,可为你的内容建立索引,让你无需构建整套检索基础设施,就能在任何应用或智能体中添加搜索功能。它早已支持将你的网站添加为数据源,并自动抓取、转换和索引网站页面。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.
不过,为网站设置 AI Search 实例,最初仍需要手动创建和配置,然后还要完成所有集成工作,让搜索端点可通过你的域名访问,并确保代理知道在哪里找到索引以及如何使用它。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.
今天,我们推出了面向智能体的 Search 功能,让你可以在 Cloudflare 控制面板中通过一个开关启用这套配置。为你的区域开启该功能后,我们的服务会创建 AI Search 实例,开始为你的内容编制索引,并让用户能够发现搜索功能,也能通过你自己的域名访问它。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
这一理念自然延伸自 Markdown for Agents:对于已启用的区域,Cloudflare 的网络会利用内容协商标头,实时将任何 HTML 页面转换为 Markdown。同样,Search for Agents 借助 AI Search 的强大功能,自动为你的区域创建索引,并提供 API,供任何 AI 智能体发现和使用,以便在你的网站上进行搜索;这一切都在网络层完成,并使用你的域名。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.
您可以通过 API 启用代理搜索,也可以前往区域页面的控制面板,在“快速操作”下启用:You can enable Search for Agents using the API, or by going to the dashboard in your zone page, under Quick Actions:
“面向智能体的搜索”对所有客户开放,包括免费套餐用户(但有使用限制)。启用后,Cloudflare 会自动创建一个 AI Search 实例,并开始抓取和索引您站点区域中的内容。请参阅我们的开发者文档,了解抓取流程的运作方式。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.
你可以直接从此页面访问你的实例,也可以前往账户中的“AI > AI Search 实例”视图:You can access your instance directly from this page, or by going to directly to your account’s AI > AI Search instances view:
为你的区域创建的 AI Search 实例使用默认设置,但你可以随时启用重排序,或更改缓存设置等配置选项。有关完整的选项列表,请参阅我们的文档。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.
AI Search 为你的内容建立索引后,你或互联网上的任何代理都可以开始使用 Search for Agents,但须遵守你的域设置(例如机器人管理设置、AI Crawl Control 和 Web 应用防火墙 (WAF) 配置)。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 for Agents 会在你网站的每个页面上自动公布搜索端点。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.
例如,对于 HTML 响应,我们会向页面的 <head> 中添加元数据: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/">
如果你还启用了 Markdown for Agents,代理使用 Accept: text/markdown 请求页面时,会在 YAML front matter 中收到相同的信息: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.
...
根据 AI Search 配置,代理还可以使用自然语言向搜索端点提问: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.
...
请注意,这个搜索端点返回的是以 Markdown 格式呈现的检索内容,而不是生成的答案。智能体已经拥有 AI 模型,并正在与用户对话;它需要的只是你网站上的相关信息,而不是另一个 AI 模型试图代替它回答。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.
支持新的 HTTP 方法:QUERYSupporting a new HTTP method: QUERY
新的 HTTP QUERY 方法是 IETF 提议标准,顺带一提,它由我们自己的 James Snell 共同撰写,并于 2026 年 6 月以 RFC 10008 发布。QUERY 允许客户端在请求正文中安全且幂等地发送搜索条件,而不会修改服务器状态。因此,它非常适合用于 AI 搜索。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.
QUERY 的采用工作正在推进,主要浏览器厂商正在讨论该 RFC,多个框架和客户端也已开始采用(例如 curl 和 undici),或正在讨论是否采用。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 原生支持使用 QUERY,可通过纯文本或 JSON 请求体发送: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
让我们在一次智能体会话中看看它的实际效果。我们的开发者文档已启用面向智能体的搜索。打开 OpenCode 会话并提问“Cloudflare Artifacts 的最大推送大小是多少?”时,我们可以在日志中看到,智能体先在主页上发现了搜索端点,然后带着问题获取 /.well-known/search,以检索搜索结果。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.
一旦代理发现了搜索 API,只要它需要在同一网站上搜索内容,很可能就会在同一会话中多次重复使用它。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.
我们在发布此公告之前,已为开发者文档启用了面向智能体的搜索,并发现智能体能够很好地找到搜索 API,并在执行任务时使用它。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.
它仍然是一个 AI Search 实例It’s still an AI Search instance
由于 Search for Agents 由你账户中的 AI Search 实例提供支持,因此你也可以使用所有标准配置选项和功能。例如,你可以启用公共 REST API 或 MCP 端点,在 Workers 中使用它,甚至可以将 AI Search 嵌入网站,供访客使用。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
从今天起,所有客户均可使用 Search for Agents。其用量按 AI Search 的定价计算,包括摄取内容、存储索引内容和处理查询;同时受账户包含的用量以及 Workers 免费版和付费版计划各自限制的约束。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.
我们还建议您查看我们的 Agent Readiness 页面(参见公告),了解如何针对智能体优化您的网站,包括指导智能体进行身份验证、控制智能体可以查看哪些内容、以何种格式接收内容,以及如何为内容付费。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.
请查看 Search for Agents 开发者文档,了解更多信息。欢迎在 X 上关注我们,或加入 Cloudflare Developer Discord 与我们交流。我们希望听听网站所有者如何让智能体能够搜索其内容。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.