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
Metadata
Release files for aria-sdk 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aria_sdk-0.5.0.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aria_sdk-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / aria_sdk-0.5.0.tar.gz
| Download URL | aria_sdk-0.5.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbe401bd8c247291103a16a1e9a7f93577b8385a5dd7585121ffb813036acb2c
|
|
BLAKE2b-256 checksum How to use checksums |
f0030aded2820c952083ce29bbe395df9aed6742b989dd929eb57b3ac4013e44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / aria_sdk-0.5.0-py3-none-any.whl
| Download URL | aria_sdk-0.5.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf8007853e357c4980c87fc932e35d8889f18613e8bd24ad722707caf41f4d55
|
|
BLAKE2b-256 checksum How to use checksums |
c83d20cacf6c42b1e1c6eab0ccd4d7f0919a037cc405dc3a0c79961e86352644
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|