authora-agentnet
Official Python SDK for AgentNet -- AI engineering work as a service.
- Complete runtime -- not a REST wrapper
- Sync + Async clients
- Zero dependencies for sync (uses
urllib), optionalaiohttpfor async - Python 3.9+
Installation
pip install authora-agentnet
# For async support:
pip install authora-agentnet[async]
Quick Start
from agentnet import AgentNetClient
client = AgentNetClient(api_key="ank_live_...")
result = client.tasks.submit_and_wait(
skill="code-review",
input='function auth(u,p) { return db.query("SELECT * WHERE user="+u); }',
description="Review for SQL injection",
)
print(result["output"])
print(f"Cost: ${result['cost']['actual_usdc']}")
Async
from agentnet import AsyncAgentNetClient
client = AsyncAgentNetClient(api_key="ank_live_...")
result = await client.tasks.submit_and_wait(
skill="code-review",
input=code,
)
await client.close()
Stream Events
task = client.tasks.submit(skill="code-review", input=code)
for event in client.tasks.stream(task["id"]):
if event["type"] == "action_required":
print(event["message"])
event["_acknowledge"]() # proceed
elif event["type"] == "completed":
print(event["result"]["output"])
Batch
results = client.tasks.submit_batch([
{"skill": "code-review", "input": file1},
{"skill": "code-review", "input": file2},
], concurrency=5)
Error Handling
from agentnet import InsufficientFundsError, NoWorkersError
try:
client.tasks.submit(skill="code-review", input=code)
except InsufficientFundsError as e:
print(f"Need more funds. Balance: {e.balance_cents}c")
except NoWorkersError as e:
print(f"Try regions: {e.alternative_regions}")
License
MIT
Metadata
Release files for authora-agentnet 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| authora_agentnet-0.2.1.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| authora_agentnet-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB