Agentic Resource Discovery: Let agents search
Agentic Resource Discovery: Let agents search
智能体资源发现:让智能体自主搜索
If you build with agents today, you probably know three protocols. MCP gives agents a standard way to call tools. Skills give agents a way of consuming instructions. A2A gives agents a way to call other agents. All three assume the user already knows which tool, instruction, or agent they need. The user is still responsible for discovering, integrating, and maintaining those capabilities. 如果你现在正在开发智能体,你可能已经了解了三种协议:MCP 为智能体提供了调用工具的标准方式;Skills 为智能体提供了获取指令的途径;A2A 则让智能体能够调用其他智能体。但这三者都预设了一个前提:用户必须预先知道自己需要哪种工具、指令或智能体。用户仍需负责发现、集成和维护这些能力。
The Agentic Resource Discovery (ARD) specification is the discovery layer that sits in front of them. It is a draft, open specification developed by contributors from Microsoft, Google, GoDaddy, Hugging Face, and others, with broad participation across the industry. It defines how agents and tools are cataloged, indexed, and searched across federated registries, so an agent can find capabilities at runtime instead of needing them pre-installed. “智能体资源发现”(Agentic Resource Discovery, ARD)规范正是位于这些协议之前的发现层。这是一项由微软、谷歌、GoDaddy、Hugging Face 等公司的贡献者共同开发的开放草案规范,得到了业界的广泛参与。它定义了如何在联邦注册中心对智能体和工具进行编目、索引和搜索,从而使智能体能够在运行时发现所需能力,而无需预先安装。
It is not a product or a marketplace. It is a shared standard that any company can implement independently, and that any agent or tool can participate in. In this post, we’ll explore the specification, how Hugging Face has implemented it, and how you can start building on ARD. 它不是一个产品,也不是一个市场,而是一个共享标准。任何公司都可以独立实现它,任何智能体或工具也都可以参与其中。在本文中,我们将探讨该规范、Hugging Face 的实现方式,以及你如何开始基于 ARD 进行构建。
The discovery problem
发现问题
The current model for agent capabilities is install-first, use-later. A developer hardcodes an MCP server URL into a config file. A user connects a service to their AI app via a plugin and reuses it. This works for the handful of tools an agent uses every day, but it doesn’t scale to thousands of ad-hoc surfaces. The fallback is to dump every available tool description into the LLM’s context window and let the model pick. This is limited by the context budget. There are search-based strategies here too, but the descriptions are often too thin to disambiguate well. 目前智能体能力的模式是“先安装,后使用”。开发者将 MCP 服务器的 URL 硬编码到配置文件中,用户通过插件将服务连接到 AI 应用并重复使用。这种方式对于智能体每天使用的少数工具尚可,但无法扩展到成千上万个临时场景。备选方案是将所有可用的工具描述塞进大模型的上下文窗口,让模型自行选择,但这会受到上下文预算的限制。虽然也有基于搜索的策略,但工具描述往往过于简单,难以进行有效的区分。
ARD moves selection outside the LLM. A registry indexes capabilities with richer signals such as publisher identity, representative queries, compliance attestations, and tags. It exposes a REST endpoint. The client searches in natural language, and the model invokes whatever the search returns. The shift is from manually installed, static catalogs to intent-based search that lets an agent find the right capability dynamically, and reach a growing ecosystem of MCP tools, A2A agents, and other services without pre-configuring each one. ARD 将选择过程移出了大模型。注册中心通过更丰富的信号(如发布者身份、代表性查询、合规性证明和标签)对能力进行索引,并提供 REST 接口。客户端使用自然语言进行搜索,模型则调用搜索返回的结果。这种转变意味着从手动安装的静态目录转向基于意图的搜索,让智能体能够动态发现合适的能力,并接入不断增长的 MCP 工具、A2A 智能体及其他服务生态,而无需对每一项进行预配置。
The specification defines two things: A static manifest format called ai-catalog.json lets publishers host their capabilities at a well-known URL. A dynamic registry API at POST /search provides live, ranked discovery.
该规范定义了两件事:一种名为 ai-catalog.json 的静态清单格式,允许发布者在固定 URL 上托管其能力;以及一个位于 POST /search 的动态注册 API,提供实时的、带排名的发现功能。
ARD on the Hugging Face Hub
Hugging Face Hub 上的 ARD
The Hugging Face Discover Tool is our reference implementation of ARD. It provides search access to thousands of Skills, ML applications, and MCP Servers — on Hugging Face and across other ARD discovery services. It works by combining the Hub’s existing semantic search over Spaces, alongside our Agent Skills, and serving the results as ARD catalog entries. Hugging Face Discover 工具是我们对 ARD 的参考实现。它提供了对数以千计的 Skills、机器学习应用和 MCP 服务器的搜索访问权限,涵盖 Hugging Face 平台及其他 ARD 发现服务。它的工作原理是将 Hub 现有的 Spaces 语义搜索与我们的 Agent Skills 相结合,并将结果作为 ARD 目录条目提供。
The Hub already hosts a catalog of Spaces running Gradio apps, MCP servers, and demos. Its semantic search supports an agents=true flag that returns Spaces ranked by agent-oriented metadata, and Discover translates that search into the ARD specification.
Hub 已经托管了一个运行 Gradio 应用、MCP 服务器和演示的 Spaces 目录。其语义搜索支持 agents=true 标志,该标志返回按智能体导向元数据排序的 Spaces,而 Discover 会将这些搜索结果转换为 ARD 规范格式。
Using it
如何使用
Discover is built into the Hugging Face CLI (hf). To get started and give you or your agent access:
Discover 已内置于 Hugging Face CLI (hf) 中。要开始使用并为你或你的智能体提供访问权限,请执行:
# Install the Hugging Face CLI tool:
# 安装 Hugging Face CLI 工具:
uv tool install huggingface_hub
# Search for resources to train a model
# 搜索用于训练模型的资源
hf discover search "Fine tune a language model"
# Find MCP Servers to generate an image
# 查找用于生成图像的 MCP 服务器
hf discover search "Generate an image" --json --kind mcp
# Search other registries
# 搜索其他注册中心
hf discover search "Purchase aeroplane tickets" --registry-url <catalog-url>
REST API and MCP Tool
REST API 与 MCP 工具
You can also search the catalog directly using either the REST API or an MCP Server. The Hugging Face catalog is published at its well-known URL: https://huggingface.co/.well-known/ai-catalog.json
你也可以直接使用 REST API 或 MCP 服务器来搜索目录。Hugging Face 目录发布在其固定 URL 上:https://huggingface.co/.well-known/ai-catalog.json
To call search directly:
直接调用搜索:
POST https://huggingface-hf-discover.hf.space/search
Alternatively, connect any MCP Client to search via MCP endpoint using https://huggingface-hf-discover.hf.space/mcp to search the catalog.
或者,将任何 MCP 客户端连接到 https://huggingface-hf-discover.hf.space/mcp,通过 MCP 端点搜索目录。
What this means for the specification
这对规范意味着什么
ARD separates discovery from execution. The static manifest format is driven by media type, so any artifact… ARD 将发现与执行分离开来。静态清单格式由媒体类型驱动,因此任何工件……