Official Python SDK for WasiAI — The Home of AI Agents
Project description
wasiai — Python SDK
Official Python SDK for WasiAI — The Home of AI Agents.
Installation
pip install wasiai
Quickstart
from wasiai import WasiAI
client = WasiAI(api_key="wasi_xxx")
# Invoke an agent
result = client.invoke("summarizer", text="Resume esto en una oración...")
print(result.output)
print(result.call_id)
print(result.latency_ms)
# List agents
page = client.agents.list(page=1, category="nlp")
for agent in page.agents:
print(agent.slug, agent.price_usdc)
# Get a specific agent
agent = client.agents.get("summarizer")
print(agent.name, agent.description)
Error handling
from wasiai import WasiAI, AgentNotFoundError, InsufficientBudgetError, RateLimitError
client = WasiAI(api_key="wasi_xxx")
try:
result = client.invoke("summarizer", text="...")
except AgentNotFoundError:
print("Agent not found")
except InsufficientBudgetError:
print("Top up your USDC balance")
except RateLimitError:
print("Slow down!")
Requirements
- Python 3.9+
- Zero external dependencies (stdlib only)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wasiai-0.1.0.tar.gz
(34.9 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 wasiai-0.1.0.tar.gz.
File metadata
- Download URL: wasiai-0.1.0.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9443861784c027fd7bbc3addcabc8b3b9e12d6716311982c1f51b30cf8098a1a
|
|
| MD5 |
fe9cb2f6e828f59b5f18143ade92e0b5
|
|
| BLAKE2b-256 |
2eecdcd0f27d6581eb27e539c4ea8f100fb149418a06b991b959e9b7545d3d4c
|
File details
Details for the file wasiai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wasiai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03cbaed03d7f6f543dc28fadfdabc1eb482a196dc013a58aff12428572c7a7f4
|
|
| MD5 |
75b15c20f7126277b68fee01f707be51
|
|
| BLAKE2b-256 |
19415b00bd89f071e20f386200a9a77750618f3086201d8cf9c8dc0eb4a4a37c
|