Observed since 21 Oct, 09:18 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI Agent Name Service 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.
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 .
Some AGNS endpoints and agent selection features require authentication using API keys. You can provide your keys in one of two ways:
.env file (recommended)Create a file named .env in your project root and add:
AGNS_API_KEY=your_agns_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
AGNS_API_KEY is required for authenticating with the Agent Name Service (AGNS) endpoints.
ANTHROPIC_API_KEY is required if you use agent selection or routing features that leverage Anthropic's Claude models (e.g., for LLM-based agent selection). This key is provided by Anthropic and enables access to their API for model inference.
The SDK will automatically load this file if you have the python-dotenv package installed (already used in the SDK).
export AGNS_API_KEY=your_agns_api_key_here
export ANTHROPIC_API_KEY=your_anthropic_api_key_here
You can obtain these API keys from your AGNS administrator/service provider and from Anthropic, respectively. The SDK will automatically use these environment variables when making authenticated requests.
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"])
lookup(name: Optional[str] = None) → dict[str, Agent] | Agent | NoneLooks up agents by name, or returns all if no name is provided.
name is provided: returns a single Agent or NoneInstall development dependencies:
pip install -r requirements-dev.txt
Run tests using pytest:
pytest
src/
agns/
__init__.py
client.py
agent.py
agent_card.py
tests/
test_integration.py
pyproject.toml
README.md
MIT License. See LICENSE for details.
Contributions are welcome! Please:
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.6 | 5 Oct 2025 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:18 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:188354dba858817d595bfa0ecd71c07937d99d0422401f3e9eeb3634497a55af