Official Python SDK for AUTON — the operating system for AI-augmented companies.
Project description
autonai
Official Python SDK for AUTON — the operating system for AI-augmented companies. Full docs at docs.getauton.ai.
pip install autonai
Requires Python 3.9+.
Quickstart
import os
from autonai import AutonClient
client = AutonClient(
base_url="https://api.getauton.ai",
api_key=os.environ["AUTON_API_KEY"], # Settings → API keys → auton_pat_…
)
# 1. Spawn a run
run = client.runs.spawn({
"agent_id": "…",
"company_id": "…",
"area_id": "…",
"actor_user_id": "…",
"domain_config": {"template_id": "marketing.performance_marketing_manager"},
"initial_messages": [
{"role": "user", "content": "Pull last week's perf data and draft a Slack update"},
],
})
# 2. Stream deltas (generator; stops at the terminal delta)
for delta in client.runs.stream(run["run_id"]):
print(delta["seq"], delta["kind"])
# 3. Triage approvals
inbox = client.approvals.list(status="pending")
client.approvals.decide(inbox[0]["id"], verdict="approve", by="…user uuid…", reason="Looks good")
More examples
# Knowledge: upload → search → cite
client.knowledge.upload(
company_id=company_id,
title="Brand book",
source="upload",
body="Voice: warm, direct, never jargon-heavy…",
)
hits = client.knowledge.search(company_id=company_id, query="brand voice")["hits"]
# Billing: this month's spend vs plan cap
usage = client.billing.usage("this_month")
print(usage["totals"]["cost_usd_micros"] / 1e6, "USD spent")
# Agent manuals: resolve with user preferences inlined
manual = client.agent_manuals.resolve(
"marketing.performance_marketing_manager",
company_id=company_id,
user_preferences={"manual_tone": "concise", "preferred_locale": "pt-BR"},
)
# Heartbeats: a weekday 9am curator tick
hb = client.heartbeats.upsert(**heartbeat_fields)
client.heartbeats.fire_now(hb["id"])
Behaviour
- Auth —
Authorization: Bearer <api_key>on every call. - Retries — idempotent GETs retry on 5xx/network (max 3, exponential
backoff). Non-idempotent calls never retry unless you pass
idempotency_key=. - Rate limits —
Retry-Afteron 429 is honoured automatically; the final failure raisesRateLimitErrorwith.retry_after. - Errors — typed:
ValidationError,AuthenticationError,PermissionError_,NotFoundError,ConflictError,RateLimitError,ServerError— all subclassingAutonErrorwith.status/.request_id. - Self-hosting — pass
orchestrator_url=/knowledge_url=/approvals_url=when those services are exposed on their own origins.
Versioning follows the gateway major: autonai==1.x ↔ gateway 1.x.
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
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 autonai-1.0.0.tar.gz.
File metadata
- Download URL: autonai-1.0.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57a0974ae79a79ca09af16c27934b7bb605ff9241f4dc53752c8c96b348ba805
|
|
| MD5 |
43d7033724da9f7bb8ffe799e19848d7
|
|
| BLAKE2b-256 |
ff3a7ff828a36ab60f4d4480120c608b794d920f7179853a1f0d9d6a5a022581
|
Provenance
The following attestation bundles were made for autonai-1.0.0.tar.gz:
Publisher:
publish-sdk-py.yml on caio-bessa/auton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autonai-1.0.0.tar.gz -
Subject digest:
57a0974ae79a79ca09af16c27934b7bb605ff9241f4dc53752c8c96b348ba805 - Sigstore transparency entry: 2075152555
- Sigstore integration time:
-
Permalink:
caio-bessa/auton@6dc28a8428a79be37f07995ceea7fd22de3055d1 -
Branch / Tag:
refs/tags/sdk-py-v1.0.0 - Owner: https://github.com/caio-bessa
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-py.yml@6dc28a8428a79be37f07995ceea7fd22de3055d1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file autonai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: autonai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a252c8fb5ecb93bc5a50594861e76b633357f2da5e7125d55f0ef6bb34b73111
|
|
| MD5 |
f64bd74cac9541bc3eaacf6172765ce2
|
|
| BLAKE2b-256 |
8841c77d09ebe3e909806ce6d38cc930e1339b8c0f39d39cf1c9194bdc562750
|
Provenance
The following attestation bundles were made for autonai-1.0.0-py3-none-any.whl:
Publisher:
publish-sdk-py.yml on caio-bessa/auton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autonai-1.0.0-py3-none-any.whl -
Subject digest:
a252c8fb5ecb93bc5a50594861e76b633357f2da5e7125d55f0ef6bb34b73111 - Sigstore transparency entry: 2075152736
- Sigstore integration time:
-
Permalink:
caio-bessa/auton@6dc28a8428a79be37f07995ceea7fd22de3055d1 -
Branch / Tag:
refs/tags/sdk-py-v1.0.0 - Owner: https://github.com/caio-bessa
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-py.yml@6dc28a8428a79be37f07995ceea7fd22de3055d1 -
Trigger Event:
push
-
Statement type: