Skip to main content

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

  • AuthAuthorization: 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 limitsRetry-After on 429 is honoured automatically; the final failure raises RateLimitError with .retry_after.
  • Errors — typed: ValidationError, AuthenticationError, PermissionError_, NotFoundError, ConflictError, RateLimitError, ServerError — all subclassing AutonError with .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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autonai-1.0.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autonai-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

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

Hashes for autonai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 57a0974ae79a79ca09af16c27934b7bb605ff9241f4dc53752c8c96b348ba805
MD5 43d7033724da9f7bb8ffe799e19848d7
BLAKE2b-256 ff3a7ff828a36ab60f4d4480120c608b794d920f7179853a1f0d9d6a5a022581

See more details on using hashes here.

Provenance

The following attestation bundles were made for autonai-1.0.0.tar.gz:

Publisher: publish-sdk-py.yml on caio-bessa/auton

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for autonai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a252c8fb5ecb93bc5a50594861e76b633357f2da5e7125d55f0ef6bb34b73111
MD5 f64bd74cac9541bc3eaacf6172765ce2
BLAKE2b-256 8841c77d09ebe3e909806ce6d38cc930e1339b8c0f39d39cf1c9194bdc562750

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page