Skip to content

Commit 0ab6c69

Browse files
committed
refactor: update HF repo references to huggingface/hf-discover
1 parent ce508dc commit 0ab6c69

8 files changed

Lines changed: 41 additions & 41 deletions

File tree

contributing/samples/ardhf/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
ARDHF wraps [HuggingFace's Agent Finder](https://github.com/huggingface/hf-agentfinder)
5+
ARDHF wraps [HuggingFace Discover](https://github.com/huggingface/hf-discover)
66
(ARD — Agentic Resource Discovery) as an ADK `BaseToolset`. It gives any ADK
77
agent the ability to **discover, inspect, and connect to** agents, skills,
88
MCP servers, HuggingFace Spaces, and other agentic resources at runtime.
@@ -161,7 +161,7 @@ Agent: Found "bark-tts" Space — here are the details: ...
161161

162162
### Registry URL
163163

164-
By default, the toolset queries the hosted HuggingFace Agent Finder registry.
164+
By default, the toolset queries the hosted HuggingFace Discover registry.
165165
Point to any ARD-compatible registry:
166166

167167
```python
@@ -193,7 +193,7 @@ export HF_TOKEN=hf_...
193193
### Local mode
194194

195195
For in-process, offline-capable search (no HTTP requests), install the
196-
`hf-agentfinder` package and enable local mode:
196+
`hf-discover` package and enable local mode:
197197

198198
```python
199199
toolset = AgentFinderToolset(local=True)
@@ -241,7 +241,7 @@ Use multiple toolset instances to search different registries:
241241

242242
```python
243243
hf_toolset = AgentFinderToolset(
244-
registry_url="https://huggingface.co/api/agentfinder",
244+
registry_url="https://evalstate-hf-discover.hf.space",
245245
tool_name_prefix="hf",
246246
)
247247
internal_toolset = AgentFinderToolset(
@@ -274,13 +274,13 @@ agent = Agent(
274274

275275
### Using the HF challenge server
276276

277-
The `hf-agentfinder` package includes a deterministic challenge server with
277+
The `hf-discover` package includes a deterministic challenge server with
278278
fixed fixtures — no API keys or network access needed:
279279

280280
```bash
281281
# Terminal 1: start the challenge server
282-
pip install hf-agentfinder
283-
hf-agentfinder challenge serve --port 8090
282+
pip install hf-discover
283+
hf-discover challenge serve --port 8090
284284

285285
# Terminal 2: run the sample app against it
286286
cd contributing/samples/ardhf
@@ -294,14 +294,14 @@ ARDHF_REGISTRY_URL=http://127.0.0.1:8090 adk web .
294294
pytest tests/unittests/tools/ardhf/ -v
295295

296296
# Integration tests (start challenge server first)
297-
hf-agentfinder challenge serve --port 8090 &
297+
hf-discover challenge serve --port 8090 &
298298
pytest tests/unittests/tools/ardhf/ -v
299299
```
300300

301301
## References
302302

303303
- [ARD Specification](https://github.com/nichochar/ard-spec) — Agentic Resource Discovery specification
304-
- [HuggingFace Agent Finder](https://github.com/huggingface/hf-agentfinder) — ARD reference implementation
304+
- [HuggingFace Discover](https://github.com/huggingface/hf-discover) — ARD reference implementation
305305
- [ai-catalog](https://github.com/nichochar/ai-catalog) — Curated agentic resource catalog
306306
- [ADK Documentation](https://google.github.io/adk-docs/) — Google Agent Development Kit
307307
- [A2A Protocol](https://github.com/a2aproject/a2a-spec) — Agent-to-Agent protocol specification

contributing/samples/ardhf/agent.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""Sample agent using the ARDHF toolset.
1616
1717
Demonstrates the full discover -> inspect -> connect flow using the
18-
HuggingFace Agent Finder (ARD) registries. The agent can search for
18+
HuggingFace Discover (ARD) registries. The agent can search for
1919
agents, inspect their cards, and connect to remote A2A agents.
2020
2121
Usage::
@@ -24,7 +24,7 @@
2424
2525
Or with the challenge server for deterministic results::
2626
27-
hf-agentfinder challenge serve --port 8090 &
27+
hf-discover challenge serve --port 8090 &
2828
ARDHF_REGISTRY_URL=http://127.0.0.1:8090 \
2929
adk web contributing/samples/ardhf
3030
"""
@@ -45,7 +45,7 @@
4545

4646
_registry_url = os.environ.get(
4747
"ARDHF_REGISTRY_URL",
48-
"https://huggingface.co/api/agentfinder",
48+
"https://evalstate-hf-discover.hf.space",
4949
)
5050
_local = os.environ.get("ARDHF_LOCAL", "").lower() in (
5151
"1",
@@ -90,12 +90,12 @@ async def summarise_findings(
9090
name="ardhf_discovery_agent",
9191
description=(
9292
"An agent that discovers and connects to agentic resources "
93-
"using the HuggingFace Agent Finder (ARD) registry."
93+
"using the HuggingFace Discover (ARD) registry."
9494
),
9595
instruction=(
9696
"You are a discovery agent. Your job is to help users find "
9797
"agents, skills, MCP servers, and other agentic resources by "
98-
"searching the Agent Finder (ARD) registry, and optionally "
98+
"searching the HuggingFace Discover (ARD) registry, and optionally "
9999
"connect to and interact with discovered A2A agents.\n\n"
100100
"## Tools\n\n"
101101
"You have several discovery tools:\n"

contributing/samples/ardhf_dynamic_agents/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ python -m contributing.samples.ardhf_dynamic_agents.agent
6969

7070
```bash
7171
# Terminal 1
72-
hf-agentfinder challenge serve --port 8090
72+
hf-discover challenge serve --port 8090
7373

7474
# Terminal 2
7575
ARDHF_REGISTRY_URL=http://127.0.0.1:8090 \
@@ -115,5 +115,5 @@ User
115115
## Related
116116

117117
- [ARDHF basic sample](../ardhf/) — Simpler sample focusing on discovery only.
118-
- [HuggingFace Agent Finder](https://github.com/huggingface/hf-agentfinder) — ARD reference implementation.
118+
- [HuggingFace Discover](https://github.com/huggingface/hf-discover) — ARD reference implementation.
119119
- [A2A Protocol](https://github.com/a2aproject/a2a-spec) — Agent-to-Agent protocol specification.

contributing/samples/ardhf_dynamic_agents/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
Or with the challenge server::
3434
35-
hf-agentfinder challenge serve --port 8090 &
35+
hf-discover challenge serve --port 8090 &
3636
ARDHF_REGISTRY_URL=http://127.0.0.1:8090 \
3737
adk web contributing/samples/ardhf_dynamic_agents
3838
"""
@@ -52,7 +52,7 @@
5252

5353
_registry_url = os.environ.get(
5454
"ARDHF_REGISTRY_URL",
55-
"https://huggingface.co/api/agentfinder",
55+
"https://evalstate-hf-discover.hf.space",
5656
)
5757
_token = os.environ.get("HF_TOKEN")
5858

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ sdc-agents = [
5050
"sdc-agents>=4.3.3; python_version >= '3.11'",
5151
]
5252
spraay = ["web3>=6.0.0"]
53-
ardhf = ["hf-agentfinder>=1.0.0"]
53+
ardhf = ["hf-discover>=1.0.0"]
5454

5555

5656
[tool.pyink]

src/google/adk_community/tools/ardhf/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""ARDHF — Agent Finder (ARD) toolset for ADK.
15+
"""ARDHF — HuggingFace Discover (ARD) toolset for ADK.
1616
17-
Wraps the HuggingFace Agent Finder
18-
(https://github.com/huggingface/hf-agentfinder) as an ADK BaseToolset,
17+
Wraps HuggingFace Discover
18+
(https://github.com/huggingface/hf-discover) as an ADK BaseToolset,
1919
giving agents the ability to discover agents, skills, MCP servers, and
2020
other agentic resources at runtime.
2121

src/google/adk_community/tools/ardhf/ardhf_toolset.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""ARDHF toolset — wraps HuggingFace Agent Finder (ARD) as BaseToolset.
15+
"""ARDHF toolset — wraps HuggingFace Discover (ARD) as BaseToolset.
1616
1717
Supports two modes:
1818
1919
* **remote** (default) — HTTP POST to any ARD-compatible registry
20-
endpoint (e.g. the hosted ``hf-agentfinder``).
21-
* **local** — uses the ``agentfinder`` Python package in-process for
20+
endpoint (e.g. the hosted ``hf-discover``).
21+
* **local** — uses the ``discover`` Python package in-process for
2222
zero-latency, offline-capable search.
2323
2424
The toolset exposes the following tools to the agent:
@@ -34,7 +34,7 @@
3434
* ``connect_agent`` — send a message to a remote A2A agent and return
3535
the response, enabling the full discover → connect → use flow.
3636
37-
Reference: https://github.com/huggingface/hf-agentfinder
37+
Reference: https://github.com/huggingface/hf-discover
3838
"""
3939

4040
from __future__ import annotations
@@ -57,8 +57,8 @@
5757

5858
logger = logging.getLogger(__name__)
5959

60-
# Default hosted HuggingFace Agent Finder registry.
61-
_DEFAULT_REGISTRY_URL = "https://huggingface.co/api/agentfinder"
60+
# Default hosted HuggingFace Discover registry.
61+
_DEFAULT_REGISTRY_URL = "https://evalstate-hf-discover.hf.space"
6262

6363
# HTTP timeout for remote requests (seconds).
6464
_HTTP_TIMEOUT = 30
@@ -145,14 +145,14 @@ def _local_search(
145145
limit: int = 10,
146146
token: str | None = None,
147147
) -> dict[str, Any]:
148-
"""Search using the in-process ``agentfinder`` package."""
148+
"""Search using the in-process ``discover`` package."""
149149
try:
150-
from agentfinder.models import SearchQuery, SearchRequest
151-
from agentfinder.server import search_agent_finder
150+
from discover.models import SearchQuery, SearchRequest
151+
from discover.server import search_discover
152152
except ImportError as exc:
153153
raise ImportError(
154-
"Local mode requires the 'hf-agentfinder' package. "
155-
"Install it with: pip install hf-agentfinder"
154+
"Local mode requires the 'hf-discover' package. "
155+
"Install it with: pip install hf-discover"
156156
) from exc
157157

158158
search_filter: dict[str, Any] = {}
@@ -163,7 +163,7 @@ def _local_search(
163163
query=SearchQuery(text=query, filter=search_filter),
164164
pageSize=limit,
165165
)
166-
response = search_agent_finder(request, token=token)
166+
response = search_discover(request, token=token)
167167
return response.model_dump(
168168
exclude_none=True, exclude_defaults=True
169169
)
@@ -215,7 +215,7 @@ def _extract_from_parts(
215215

216216

217217
class AgentFinderToolset(BaseToolset):
218-
"""ADK BaseToolset wrapping HuggingFace Agent Finder (ARD).
218+
"""ADK BaseToolset wrapping HuggingFace Discover (ARD).
219219
220220
Provides ``search_ards``, ``search_agents``, ``search_skills``,
221221
``search_tools``, ``search_spaces``, ``get_agent_card``, and
@@ -226,7 +226,7 @@ class AgentFinderToolset(BaseToolset):
226226
registry_url: ARD registry URL for remote mode. Ignored when
227227
``local=True``.
228228
token: Optional Bearer token for authenticated registry access.
229-
local: When ``True``, use the ``agentfinder`` Python package
229+
local: When ``True``, use the ``discover`` Python package
230230
in-process instead of making HTTP requests.
231231
allowed_schemes: URL schemes permitted for ``get_agent_card``
232232
and ``connect_agent``. Defaults to ``("http", "https")``

tests/unittests/tools/ardhf/test_ardhf_toolset.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"""Tests for the ARDHF toolset.
1616
1717
Unit tests run without any external services. Integration tests
18-
require the hf-agentfinder challenge server (deterministic fixtures,
18+
require the hf-discover challenge server (deterministic fixtures,
1919
no API keys needed)::
2020
21-
pip install hf-agentfinder
22-
hf-agentfinder challenge serve --port 8090
21+
pip install hf-discover
22+
hf-discover challenge serve --port 8090
2323
pytest tests/unittests/tools/ardhf/ -v
2424
"""
2525

@@ -390,13 +390,13 @@ async def test_local_mode_delegates_to_local_search(self):
390390

391391
@pytest.mark.asyncio
392392
async def test_local_mode_import_error_returns_error(self):
393-
"""Local mode returns error when agentfinder is not installed."""
393+
"""Local mode returns error when hf-discover is not installed."""
394394
toolset = AgentFinderToolset(local=True)
395395

396396
with patch(
397397
"google.adk_community.tools.ardhf.ardhf_toolset"
398398
"._local_search",
399-
side_effect=ImportError("agentfinder not installed"),
399+
side_effect=ImportError("hf-discover not installed"),
400400
):
401401
result = await toolset._do_search("test query")
402402

0 commit comments

Comments
 (0)