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.3.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.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agns-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 7ada1c554aba522d33347aba24a275fa8a566abc5bb2bc3f1144a4ef5ae1d593
MD5 1d9535c3fd05ed308e327332cc1fa308
BLAKE2b-256 e1ce6c7b9d4c4bfa3ac6639a81d5a6437b4ec0d357194d0e3a9305d180dbfc5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agns-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea1d1250b8444e9ada5c85491260e6637be36b5b230215ef988eca0a8105cd0
MD5 c32c65557c200722936f7edf2bd7d3ae
BLAKE2b-256 3833b039f3ab69a0a84e84b0760c1210083a51e5cdfa1783ed19f84e4004df2a

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