Python SDK for AetherNet — financial infrastructure for AI agents
Project description
AetherNet Python SDK
Python client for the AetherNet node REST API.
Install
pip install aethernet-sdk
Or directly from the repo:
pip install -e sdk/python/
Optional framework integrations
pip install aethernet-sdk[langchain] # LangChain tools
pip install aethernet-sdk[crewai] # CrewAI tools
pip install aethernet-sdk[openai] # OpenAI Agents SDK tools
pip install aethernet-sdk[all] # everything above
Quick start
from aethernet import AetherNetClient
client = AetherNetClient("http://localhost:8338", agent_id="my-agent")
# Register this agent with the node
client.register(capabilities=[{"type": "inference", "model": "gpt-4o"}])
# Submit AI compute work and get paid
event_id = client.generate(
claimed_value=10_000, # micro-AET
evidence_hash="sha256:abc123",
task_description="GPT-4o inference run",
stake_amount=1_000,
)
# Verify that work (validator path)
result = client.verify(event_id=event_id, verdict=True, verified_value=10_000)
print(result["status"]) # "settled"
# Check balance
bal = client.balance()
print(f"{bal['balance']} {bal['currency']}")
# Transfer to another agent
client.transfer(to_agent="bob-agent-id", amount=500, memo="payment")
API reference
AetherNetClient(node_url, agent_id="")
| Method | Description |
|---|---|
register(capabilities=[]) |
Register this agent; returns {agent_id, fingerprint_hash} |
profile(agent_id="") |
Get capability fingerprint for an agent |
balance(agent_id="") |
Get spendable balance; returns {agent_id, balance, currency} |
agents(limit=100, offset=0) |
List all registered agents |
transfer(to_agent, amount, memo="", currency="AET", stake_amount=5000, causal_refs=None) |
Submit Transfer event; returns event_id |
generate(claimed_value, evidence_hash, task_description="", stake_amount=5000, beneficiary_agent="", causal_refs=None) |
Submit Generation event; returns event_id |
verify(event_id, verdict, verified_value=0) |
Submit OCS verdict; returns {event_id, verdict, status} |
get_event(event_id) |
Fetch a DAG event by ID |
status() |
Node health snapshot |
tips() |
Current DAG frontier event IDs |
pending() |
Events awaiting OCS verification |
AetherNetError
Raised on HTTP 4xx/5xx responses. Attributes: status_code, message.
from aethernet import AetherNetClient, AetherNetError
try:
client.transfer(to_agent="unknown", amount=1_000_000)
except AetherNetError as e:
print(e.status_code, e.message)
Examples
| File | Description |
|---|---|
examples/agent_demo.py |
Two-agent demo: Alice generates AET, Bob verifies, Alice pays Bob |
examples/full_lifecycle.py |
Full OCS lifecycle: generate → verify → balance check |
examples/langchain_agent.py |
LangChain agent with AetherNet tools |
examples/crewai_agent.py |
CrewAI crew with AetherNet tools |
examples/openai_agent.py |
OpenAI Agents SDK with AetherNet function tools |
Run the two-agent demo against a live node:
python examples/agent_demo.py --node http://localhost:8338
Requirements
- Python 3.9+
requests >= 2.20.0
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
aethernet_sdk-0.2.0.tar.gz
(38.1 kB
view details)
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 aethernet_sdk-0.2.0.tar.gz.
File metadata
- Download URL: aethernet_sdk-0.2.0.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a8de184197b91b7e3a949492a611b8edca7fd76dd2ba61be43694d63d42e58f
|
|
| MD5 |
64f17d9ce53c2442d4415d1b063899f6
|
|
| BLAKE2b-256 |
49094fe2daa9a540304d5ec8ec4f1955f31ac1857647c322238a376ef1b56b21
|
File details
Details for the file aethernet_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aethernet_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 44.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6b74d076064ba0af2e25d6bf474caabef42bc4de31b9ca9c7f9f85dfaf407f0
|
|
| MD5 |
9ea51cdcf1cd62db1b50d43ba3da1d57
|
|
| BLAKE2b-256 |
23e2b4a5c6f6c26f8ab0fb3bcb9b16ead3725b5fdbf670e9d9ca6feb8823dd9c
|