Python SDK for AgentDNS - Service naming and discovery system for LLM Agents
Project description
AgentDNS Python SDK
Overview This is the python sdk for AgentDNS. AgentDNS is a root domain naming and service discovery system designed to enable LLM agents to autonomously discover, resolve, and securely invoke third-party agent and tool services across organizational and technological boundaries.
For more details about AgentDNS, please refer to the original research paper: https://arxiv.org/abs/2505.22368
🎯 Features
- 🔍 Semantic Service Discovery: Find the most suitable Agent or Tool service using natural language semantics
- ⚡ Unified Service Invocation: Call various Agent or Tool services through a standardized interface
- 🔄 Async Support: Supports both synchronous and asynchronous operation modes
- 💰 Cost Management: Balance inquiry and usage tracking
📦 Installation
Install with pip
pip install agentdns
Development environment installation
git clone https://github.com/agentdns/agentdns-sdk.git
cd agentdns-sdk
pip install -e ".[dev]"
Note: This project uses the src-layout structure, with the package code located in the src/agentdns/ directory.
🚀 Quick start
Basic Use
from agentdns import AgentDNS
# Set api_key (You need to register in advance on the AgentDNS root service web)
AGENTDNS_API_KEY = 'your_agentdns_api_key'
# Initialize the client
client = AgentDNS(
api_key=AGENTDNS_API_KEY,
base_url="https://agentdnsroot.com",
)
# Service discovery
tools = client.search("I need a search service")
print(f"{len(tools)} tools found")
# View the information of the first tool
tool = tools[0]
print(f"Tool Name: {tool['name']}")
print(f"Organization: {tool['organization']}")
print(f"Price: {tool['cost']['price']} {tool['cost']['currency']}")
# Service request
data = {
"q": "What is LLM Agent?",
"scope": "webpage",
"includeSummary": True,
"includeRowContent": False,
"size": 10
}
response = client.request(tool["agentdns_url"], json=data)
print(f"Result: {response}")
📄 Licence
This project uses [Apache-2.0 licence]。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentdns-0.1.0.tar.gz.
File metadata
- Download URL: agentdns-0.1.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0579b4bd946871417277eb1cdb00efd500bd48c64970a97fcf9eb5749580107
|
|
| MD5 |
3b2019d63248b76babad472b36c48366
|
|
| BLAKE2b-256 |
2c3527d58a77dd0568eba3c0cfd255bb2ef250b15bf09120c1272f6e37057283
|
File details
Details for the file agentdns-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentdns-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9132eb576a620bafc9617cf1ea9ea4a66ae7c1f14100e5954465010b740abbf
|
|
| MD5 |
6dfa237167fa1af86b3b8205f2da439f
|
|
| BLAKE2b-256 |
806c109903c8c363d2fe2592b1b242702d405411767a88760c2a6191b257865b
|