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.
Metadata
Release files for autonai 1.0.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 | Provenance | |
|---|---|---|---|---|
| autonai-1.0.0.tar.gz | 8.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autonai-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / autonai-1.0.0.tar.gz
| Download URL | autonai-1.0.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57a0974ae79a79ca09af16c27934b7bb605ff9241f4dc53752c8c96b348ba805
|
|
BLAKE2b-256 checksum How to use checksums |
ff3a7ff828a36ab60f4d4480120c608b794d920f7179853a1f0d9d6a5a022581
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / autonai-1.0.0-py3-none-any.whl
| Download URL | autonai-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a252c8fb5ecb93bc5a50594861e76b633357f2da5e7125d55f0ef6bb34b73111
|
|
BLAKE2b-256 checksum How to use checksums |
8841c77d09ebe3e909806ce6d38cc930e1339b8c0f39d39cf1c9194bdc562750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logSecurity for autonai 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for autonai-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.