跳到正文
cloudflare blog(blog.cloudflare.com)· Celso Martinho·· 3 小時前精選品質評分72

Cloudflare 推出 Search for Agents,讓 AI 助理搜尋網站內容

Introducing Search for Agents

重點導讀

網站內容要讓 AI 助理找到,通常得先建立搜尋索引,再設定搜尋入口。

  • Cloudflare 推出 Search for Agents,網站管理者只要在 Cloudflare 控制台開啟功能,系統就會建立 AI Search 索引、開始整理網站內容,並在網站頁面標示搜尋 API 的位置,讓 AI 助理能自行找到並查詢。搜尋結果會以 Markdown 提供,內容由網站的搜尋索引找出,不會另外生成答案。這項功能提供給所有客戶,免費方案有使用限制,費用依 AI Search 的用量計算。
  • 網站的機器人管理與防火牆設定也會影響 AI 助理能否使用搜尋入口。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

推薦理由

原本要讓 AI 助理搜尋網站,得先建立索引並自行接好搜尋入口;這項更新把設定整合到 Cloudflare 網站控制台。

正文 · 中文翻譯

AI Search 是我們的服務,可為你的內容建立索引,讓你在任何應用程式或 AI 助理中加入搜尋功能,無須自行建置整套檢索基礎架構。這項服務早已支援將網站 設為資料來源,並自動爬取、轉換及建立網頁索引。

不過,為網站設定 AI Search 執行個體,仍須先手動建立並設定,接著還要完成所有整合工作,才能讓搜尋端點從你的網域存取,並確保 AI 助理知道索引的位置及使用方式。

今天我們推出Search for Agents,只要在 Cloudflare 控制面板切換開關,就能完成上述設定。為你的網域區域啟用後,我們的服務會建立 AI Search 執行個體、開始為你的內容建立索引,並讓搜尋功能可從你自己的網域中被探索及使用。

運作方式

這個概念自然延伸自Markdown for Agents:在啟用的網域區域中,Cloudflare 網路會透過內容協商標頭,即時將任何 HTML 網頁轉換成 Markdown。同樣地,Search for Agents 運用 AI Search 的功能,自動為你的網域區域建立索引,並公開 API,讓任何 AI 助理都能探索並用來搜尋你的網站;這一切都會在網路層級、透過你的網域完成。

你可以透過 API 啟用 Search for Agents,也可以前往網域區域頁面的控制面板,在快速操作中啟用:

所有客戶都能使用 Search for Agents,包括免費方案(但有使用限制)。啟用後,Cloudflare 會自動建立 AI Search 執行個體,並開始爬取及索引你網域區域中的內容。請參閱開發者檔案  ,瞭解爬取程式的運作方式。

你可以直接從此頁面存取執行個體,也可以前往帳戶中的AI > AI Search 執行個體檢視頁面:

系統會以預設設定為你的網域區域建立 AI Search 執行個體,但你隨時可以啟用重新排序功能,或變更快取設定等選項。完整選項請參閱說明檔案 。

AI Search 為你的內容建立索引後,你或網際網路上的任何 AI 助理都可以開始使用 Search for Agents,實際存取情形取決於你的網域設定(例如機器人管理設定、AI 爬取控制 及網頁應用程式防火牆(WAF)設定)。

探索功能

如果 AI 助理不知道搜尋功能的存在,搜尋就派不上用場。為了讓搜尋功能更容易被探索,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 ,AI 助理以Accept: text/markdown 要求網頁時,會在 YAML 前置資料中收到相同資訊:

---
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/"
---

AI 助理能輕易取得這些指示,並知道接下來該如何搜尋你的網站。

搜尋內容

AI 助理得知你的網站設有搜尋端點後,就能開始使用:

$ 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 設定而定,AI 助理也可以使用自然語言,向搜尋端點提出問題:

$ 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 模型代替它作答。

支援新的 HTTP 方法:QUERY

順帶一提,新的 HTTP QUERY 方法是 IETF 提議標準,由我們的 James Snell 共同撰寫,並於 2026 年 6 月以 RFC 10008 發布。QUERY 可讓使用者端在要求本文中安全且具冪等性地傳送搜尋條件,而不會修改伺服器狀態,因此很適合用於 AI 搜尋。

QUERY 正逐步獲得採用,主要瀏覽器廠商正在討論 這份 RFC,多個架構與使用者端也已採用(例如 curl 和 undici),或正在討論 採用。

Search for Agents 原生支援以純文字或 JSON 要求本文傳送 QUERY:

# 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 後,在同一個工作階段中,只要需要搜尋同一網站的內容,很可能就會重複使用這個 API。

我們在這次公告前,已為開發者檔案啟用 Search for Agents;我們發現代理程式能妥善找到搜尋 API,並在執行工作時加以使用。

它仍是 AI Search 執行個體

Search for Agents 是由你帳戶中的 AI Search 執行個體提供,因此也具備所有標準設定選項與功能。例如,你可以啟用公開的 REST API 或 MCP 端點,也可以透過 Workers 使用,甚至可以在網站上嵌入 AI Search,供一般訪客使用。

開始使用 Search for Agents

Search for Agents 自即日起開放所有客戶使用。使用費用依照 AI Search 定價計算;費用涵蓋內容擷取、索引內容儲存與提供查詢服務,並受帳戶在 Workers 免費與付費方案中的內含用量和限制約束。

我們也建議你檢視代理程式就緒度 頁面(請參閱公告),瞭解如何讓網站更適合代理程式使用,包括引導代理程式進行驗證、控制代理程式可檢視的內容及收到的內容格式,以及決定如何向代理程式收費。

如需更多資訊,請參閱 Search for Agents 的開發者檔案。歡迎在 X 追蹤我們,或到 Cloudflare 開發者 Discord 與我們交流。我們想聽聽網站所有者如何讓代理程式搜尋自己網站上的內容。

來源: cloudflare blog (blog.cloudflare.com)
開啟原文

讀者討論

理性交流 · 即時討論