Skip to content

feat: add AgentDiscoveryTool for Agent Discovery Protocol support#2204

Open
fuleinist wants to merge 1 commit intohuggingface:mainfrom
fuleinist:feat/agent-discovery-tool
Open

feat: add AgentDiscoveryTool for Agent Discovery Protocol support#2204
fuleinist wants to merge 1 commit intohuggingface:mainfrom
fuleinist:feat/agent-discovery-tool

Conversation

@fuleinist
Copy link
Copy Markdown

Summary

Implements AgentDiscoveryTool: a new tool that fetches /.well-known/agent-discovery.json per the Agent Discovery Protocol (ADP) specification. This lets agents auto-discover available services at any domain without prior knowledge of its offerings.

What was added

  • AgentDiscoveryTool in src/smolagents/default_tools.py - stdlib-only (urllib, json), no new dependencies
  • 2 unit tests in tests/test_default_tools.py covering invalid domain format and nonexistent domain
  • Exported via __all__

Why this fits smolagents

Testing

All tests pass (2 new + existing tests unaffected):

tests/test_default_tools.py::TestAgentDiscoveryTool::test_invalid_domain_format PASSED
tests/test_default_tools.py::TestAgentDiscoveryTool::test_nonexistent_domain PASSED

Implements AgentDiscoveryTool in default_tools.py following issue huggingface#2190.
Stdlib-only (urllib, json), no new dependencies.
Adds two unit tests for invalid domain and nonexistent domain handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support Agent Discovery Protocol (/.well-known/agent-discovery.json)

1 participant