Skip to main content

AI Agent Name Service SDK

Project description

AGNS Python SDK

A lightweight Python SDK for interacting with the Agent Name Service (AGNS). This library allows you to look up and communicate with language agents via a clean and simple interface.


📦 Installation

Install the latest version from PyPI:

pip install agns

For local development:

git clone https://github.com/coffer-id/agent-platform.git
cd agns
pip install -e .

🚀 Usage Example

from agns import agns

# Lookup all available agents
result = agns.lookup()

# Choose an agent to ask a question
if isinstance(result, dict):
    agent = next(iter(result.values()), None)
elif result:
    agent = result
else:
    raise RuntimeError("No agent found.")

# Ask the agent something
question = {"text": "Hello", "target_language": "es"}
response = agent.ask(question)

print("Translated:", response["translated_text"])

📘 API Overview

lookup(name: Optional[str] = None) → dict[str, Agent] | Agent | None

Looks up agents by name, or returns all if no name is provided.

  • If name is provided: returns a single Agent or None
  • If not: returns a dictionary of agents keyed by name

🧪 Running Tests

Install development dependencies:

pip install -r requirements-dev.txt

Run tests using pytest:

pytest

🗂 Project Structure

src/
  agns/
    __init__.py
    client.py
    agent.py
    agent_card.py
tests/
  test_integration.py
pyproject.toml
README.md

📜 License

MIT License. See LICENSE for details.


🤝 Contributing

Contributions are welcome! Please:

  1. Fork this repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a pull request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agns-0.1.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agns-0.1.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file agns-0.1.2.tar.gz.

File metadata

  • Download URL: agns-0.1.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for agns-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5c6fb8a2d6f2949316ab4323efda3cef65da487e8e2305d9b8e02a785a338734
MD5 0a13fa9556ec38ee35aeb64b093dcd58
BLAKE2b-256 425c8848223bcf83a5acecbec2b50afae1add448997ce34d2167d1628e4258c1

See more details on using hashes here.

File details

Details for the file agns-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agns-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for agns-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4845b6d21a514ea92a7fc65eb00c2558a1ecebf04230ab501f26e0e8fcbba6a
MD5 ae364a858bd225a69a0c959608856aa6
BLAKE2b-256 6f94eb3eefb4aefae6f3118e20866ac61e0752e03ada4657751e4b963c13bd6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page