agentdns


Nameagentdns JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython SDK for AgentDNS - Service naming and discovery system for LLM Agents
upload_time2025-08-06 13:38:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords agentdns llm agent service-discovery dns ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pip install agentdns
```

### Development environment installation

```bash
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

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


---

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "agentdns",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "agentdns, llm, agent, service-discovery, dns, ai",
    "author": null,
    "author_email": "Enfang Cui <enfangcui@gmail.com>, Zhiyuan Liang <liangzy512@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2c/35/27d58a77dd0568eba3c0cfd255bb2ef250b15bf09120c1272f6e37057283/agentdns-0.1.0.tar.gz",
    "platform": null,
    "description": "# AgentDNS Python SDK\n\n**Overview**\nThis 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.\n\nFor more details about AgentDNS, please refer to the original research paper: https://arxiv.org/abs/2505.22368\n\n## \ud83c\udfaf Features\n\n- **\ud83d\udd0d Semantic Service Discovery**: Find the most suitable Agent or Tool service using natural language semantics\n- **\u26a1 Unified Service Invocation**: Call various Agent or Tool services through a standardized interface\n- **\ud83d\udd04 Async Support**: Supports both synchronous and asynchronous operation modes\n- **\ud83d\udcb0 Cost Management**: Balance inquiry and usage tracking\n\n\n## \ud83d\udce6 Installation\n\n### Install with pip\n\n```bash\npip install agentdns\n```\n\n### Development environment installation\n\n```bash\ngit clone https://github.com/agentdns/agentdns-sdk.git\ncd agentdns-sdk\npip install -e \".[dev]\"\n```\n\n**Note**: This project uses the src-layout structure, with the package code located in the `src/agentdns/` directory.\n\n\n## \ud83d\ude80 Quick start\n\n### Basic Use\n\n```python\nfrom agentdns import AgentDNS\n\n# Set api_key (You need to register in advance on the AgentDNS root service web)\nAGENTDNS_API_KEY = 'your_agentdns_api_key'\n\n# Initialize the client\nclient = AgentDNS(\n    api_key=AGENTDNS_API_KEY,\n    base_url=\"https://agentdnsroot.com\", \n)\n\n# Service discovery\ntools = client.search(\"I need a search service\")\nprint(f\"{len(tools)} tools found\")\n\n# View the information of the first tool\ntool = tools[0]\nprint(f\"Tool Name: {tool['name']}\")\nprint(f\"Organization: {tool['organization']}\")\nprint(f\"Price: {tool['cost']['price']} {tool['cost']['currency']}\")\n\n# Service request\ndata = {\n    \"q\": \"What is LLM Agent?\",\n    \"scope\": \"webpage\",\n    \"includeSummary\": True,\n    \"includeRowContent\": False,\n    \"size\": 10\n}\n\nresponse = client.request(tool[\"agentdns_url\"], json=data)\nprint(f\"Result: {response}\")\n```\n\n\n## \ud83d\udcc4 Licence\n\nThis project uses [Apache-2.0 licence]\u3002\n\n\n---\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Python SDK for AgentDNS - Service naming and discovery system for LLM Agents",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/agentdns/agentdns-sdk",
        "Repository": "https://github.com/agentdns/agentdns-sdk.git"
    },
    "split_keywords": [
        "agentdns",
        " llm",
        " agent",
        " service-discovery",
        " dns",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "806c109903c8c363d2fe2592b1b242702d405411767a88760c2a6191b257865b",
                "md5": "6dfa237167fa1af86b3b8205f2da439f",
                "sha256": "f9132eb576a620bafc9617cf1ea9ea4a66ae7c1f14100e5954465010b740abbf"
            },
            "downloads": -1,
            "filename": "agentdns-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6dfa237167fa1af86b3b8205f2da439f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18099,
            "upload_time": "2025-08-06T13:38:07",
            "upload_time_iso_8601": "2025-08-06T13:38:07.492230Z",
            "url": "https://files.pythonhosted.org/packages/80/6c/109903c8c363d2fe2592b1b242702d405411767a88760c2a6191b257865b/agentdns-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2c3527d58a77dd0568eba3c0cfd255bb2ef250b15bf09120c1272f6e37057283",
                "md5": "3b2019d63248b76babad472b36c48366",
                "sha256": "d0579b4bd946871417277eb1cdb00efd500bd48c64970a97fcf9eb5749580107"
            },
            "downloads": -1,
            "filename": "agentdns-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3b2019d63248b76babad472b36c48366",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14770,
            "upload_time": "2025-08-06T13:38:08",
            "upload_time_iso_8601": "2025-08-06T13:38:08.854070Z",
            "url": "https://files.pythonhosted.org/packages/2c/35/27d58a77dd0568eba3c0cfd255bb2ef250b15bf09120c1272f6e37057283/agentdns-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-06 13:38:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "agentdns",
    "github_project": "agentdns-sdk",
    "github_not_found": true,
    "lcname": "agentdns"
}
        
Elapsed time: 1.43288s