AGENIUM — Agent-to-Agent Communication SDK (Python)
Local, stateful agent-to-agent communication using the agent:// protocol.
Quick Start
pip install agenium
Create an Agent
import asyncio
from agenium import Agent
async def main():
# Create and start an agent
agent = Agent("my-agent")
# Register a tool
@agent.tool("greet", description="Greet someone")
async def greet(name: str) -> str:
return f"Hello, {name}! I'm {agent.name}."
# Start listening
await agent.start(port=8443)
# Register on the AGENIUM DNS
await agent.register(api_key="dom_your_key_here")
print(f"Agent running at agent://{agent.name}")
asyncio.run(main())
Connect to an Agent
import asyncio
from agenium import Agent
async def main():
agent = Agent("client-agent")
await agent.start()
# Resolve and connect
session = await agent.connect("agent://my-agent")
# Call a remote tool
result = await agent.call_tool(session.id, "greet", {"name": "World"})
print(result) # "Hello, World! I'm my-agent."
# Send a message
await agent.send(session.id, "ping", {"data": "hello"})
await agent.stop()
asyncio.run(main())
DNS Resolution
from agenium.dns import DNSResolver
resolver = DNSResolver()
agent = await resolver.resolve("my-agent")
print(agent.endpoint) # https://1.2.3.4:8443
print(agent.tools) # [Tool(name='greet', ...)]
Features
agent://Protocol — URI-based agent addressing (agent://name)- DNS Resolution — Automatic agent discovery via AGENIUM DNS (185.204.169.26)
- Stateful Sessions — Persistent sessions with SQLite storage
- Tool System — Register/invoke tools across agents
- mTLS Security — Mutual TLS with auto-generated certificates
- Capability Manifest — Agents advertise their tools in DNS
- Async-First — Built on
asyncioandhttpx
Architecture
┌──────────┐ agent://name ┌──────────┐
│ Agent A │ ──────────────────> │ DNS │
│ │ <────────────────── │ Server │
│ (client) │ endpoint + tools │ │
└─────┬─────┘ └───────────┘
│
│ mTLS + HTTP/2
▼
┌──────────┐
│ Agent B │
│ (server) │
│ :8443 │
└──────────┘
API Reference
Agent(name, config=None)
Create an agent instance.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str |
required | Agent name (2-50 chars, lowercase) |
config |
AgentConfig |
None |
Optional configuration |
Key Methods
| Method | Description |
|---|---|
agent.start(port=8443) |
Start the agent server |
agent.stop() |
Gracefully shutdown |
agent.register(api_key) |
Register on AGENIUM DNS |
agent.connect(uri) |
Connect to another agent |
agent.send(session_id, event, data) |
Send event to session |
agent.call_tool(session_id, tool, params) |
Invoke remote tool |
agent.tool(name, ...) |
Decorator to register a tool |
DNSResolver(server=None)
Resolve agent:// URIs.
| Method | Description |
|---|---|
resolver.resolve(name) |
Resolve agent name to endpoint |
resolver.resolve_uri(uri) |
Resolve full agent:// URI |
Compatibility
This is the official Python SDK for AGENIUM. It's fully compatible with the Node.js SDK (npm install agenium).
Links
- Website: https://agenium.net
- Docs: https://docs.agenium.net
- GitHub: https://github.com/Aganium/agenium-python
- npm (Node.js): https://www.npmjs.com/package/agenium
- Discord: Coming soon
License
MIT © AGENIUM
Metadata
Release files for agenium 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agenium-0.1.0.tar.gz | 18.6 kB | Without provenance | Details for agenium-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agenium-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agenium-0.1.0-py3-none-any.whl |
Total release size: 36.9 kB
Release files / agenium-0.1.0.tar.gz
| Download URL | agenium-0.1.0.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bd74cba79adfe451c8e5d16b1ab6e81a7e78d90515422e39151a861c58c931c
|
|
BLAKE2b-256 checksum How to use checksums |
6d8b07398f616ef866dffb27620ca2b8e35e872826b596757fe12443f2c51339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / agenium-0.1.0-py3-none-any.whl
| Download URL | agenium-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
491b60965ebfabf382cde4d44d153ed9ba3a8e89ff4c6ca23f186a7b679402af
|
|
BLAKE2b-256 checksum How to use checksums |
1eb65a699c47fc8a15da3e5407fc2f4920c88bdeabf402ae5859747844c4a63f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for agenium 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.