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
Or directly from the repo:
pip install -e sdk/python/
Optional framework integrations
pip install aethernet[langchain] # LangChain tools
pip install aethernet[crewai] # CrewAI tools
pip install aethernet[openai] # OpenAI Agents SDK tools
pip install aethernet[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.1.0.tar.gz
(18.8 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.1.0.tar.gz.
File metadata
- Download URL: aethernet_sdk-0.1.0.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4decc94bcfa9b5fc129ae38bd363c519496fb27175e50c0348134a33c082110a
|
|
| MD5 |
03fa46f62c9bd455c08e2c95fdfec70f
|
|
| BLAKE2b-256 |
ad5c4b51e3d147b184e4105d34fc6f14a158fbb361dde730c18f3e319d0e85b8
|
File details
Details for the file aethernet_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aethernet_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.9 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 |
0f919307eeb3404979f828488f882c0787ddffd39a1dafd7f4e57a90152081a4
|
|
| MD5 |
1b371fe0655eb1428401ca83f401f68f
|
|
| BLAKE2b-256 |
6784ba2527115b069283ceb6e725e8815c303a66f0e2c2ccfef99dd326f1bd60
|