Official Python SDK for ARIA - Trust Infrastructure for AI Agents
Project description
ARIA Python SDK
Official Python SDK for ARIA — trust infrastructure for AI agents. Functional parity with the TypeScript SDK.
Install
pip install aria-sdk
Quick start
from aria_sdk import ARIAClient
aria = ARIAClient(base_url="https://ariatrust.org", api_key="YOUR_API_KEY")
# Register an agent — save the did and secret.
agent = aria.register_agent(name="my-agent", scope=["read:data", "send:email"])
print(agent["did"]) # did:agentrust:...
print(agent["secret"]) # keep this secret
# Track an action. fn() runs only if the action is within scope.
result = aria.track(
agent["did"], agent["secret"], "read:data",
lambda: fetch_user_data(user_id),
)
print(result.value) # whatever fn() returned
Modes
# Light — fire and forget, zero added latency.
aria.track(did, secret, "read:data", fn, mode="light")
# Enforce (default) — blocking scope check before fn() runs.
aria.track(did, secret, "read:data", fn)
# Gate — require human approval before executing.
from aria_sdk import GateDeniedException
try:
aria.track(
did, secret, "delete:records", fn,
mode="gate",
gate={
"requireApproval": ["delete:*"],
"autoBlock": ["drop:*", "truncate:*"],
"timeoutMs": 5 * 60 * 1000,
},
)
except GateDeniedException:
print("Owner denied — action blocked")
Exceptions
| Exception | Raised when |
|---|---|
ScopeViolationException |
The action is outside the agent's declared scope. fn() never runs. |
GateBlockedException |
The action matches an autoBlock pattern. fn() never runs. |
GateDeniedException |
The owner denied the gated action. fn() never runs. |
GateTimeoutException |
No approval arrived before timeoutMs. fn() never runs. |
EventLimitException |
The plan's monthly event limit was reached. |
License
BUSL-1.1
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
aria_sdk-0.5.0.tar.gz
(6.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 aria_sdk-0.5.0.tar.gz.
File metadata
- Download URL: aria_sdk-0.5.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbe401bd8c247291103a16a1e9a7f93577b8385a5dd7585121ffb813036acb2c
|
|
| MD5 |
2da9a2ec4fea6208ab901dbfb49d0377
|
|
| BLAKE2b-256 |
f0030aded2820c952083ce29bbe395df9aed6742b989dd929eb57b3ac4013e44
|
File details
Details for the file aria_sdk-0.5.0-py3-none-any.whl.
File metadata
- Download URL: aria_sdk-0.5.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf8007853e357c4980c87fc932e35d8889f18613e8bd24ad722707caf41f4d55
|
|
| MD5 |
c24ea377c9eb9bc1a411816a3c892a29
|
|
| BLAKE2b-256 |
c83d20cacf6c42b1e1c6eab0ccd4d7f0919a037cc405dc3a0c79961e86352644
|