Skip to main content

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]。


Release files for agentdns 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentdns 0.1.0
File Size Uploaded
agentdns-0.1.0.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentdns 0.1.0
File Interpreter ABI Platform
agentdns-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.9 kB

Release files / agentdns-0.1.0.tar.gz

Download URL agentdns-0.1.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d0579b4bd946871417277eb1cdb00efd500bd48c64970a97fcf9eb5749580107
BLAKE2b-256 checksum
How to use checksums
2c3527d58a77dd0568eba3c0cfd255bb2ef250b15bf09120c1272f6e37057283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / agentdns-0.1.0-py3-none-any.whl

Download URL agentdns-0.1.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9132eb576a620bafc9617cf1ea9ea4a66ae7c1f14100e5954465010b740abbf
BLAKE2b-256 checksum
How to use checksums
806c109903c8c363d2fe2592b1b242702d405411767a88760c2a6191b257865b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page