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
nameis provided: returns a singleAgentorNone - 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:
- Fork this repository
- Create a feature branch
- Commit your changes
- 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
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 agns-0.1.4.tar.gz.
File metadata
- Download URL: agns-0.1.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77154b7659224228680fe52bf43e249343a627c8859ae023cfd3802fece00523
|
|
| MD5 |
6cba507d28eb19bdcb3ebd0def71c546
|
|
| BLAKE2b-256 |
cdf7c0d9d382ddd618682231402c497c33b7d8abe13753ea1d0bb1e3680a9af7
|
File details
Details for the file agns-0.1.4-py3-none-any.whl.
File metadata
- Download URL: agns-0.1.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
864b20ce27e215e77b016a07b13bfdbe091090a00e00e20ac946f17b3e6790bc
|
|
| MD5 |
947bcef27260fdb23cf150d93749a00f
|
|
| BLAKE2b-256 |
b60f62f5573b4cd9ed18b941b64ab41f77822e7384af0d886241da97ab283d8f
|