Skip to main content

Enterprise LLM agent control plane SDK for routing, caching, and observability

Project description

ASAHIO Python SDK

Python client for the ASAHIO gateway and agent control plane.

Install

cd sdk
pip install -e .

Quick start

from asahio import Asahio

client = Asahio(
    api_key="asahio_live_your_key",
    org_slug="your-org-slug",
)

response = client.chat.completions.create(
    messages=[{"role": "user", "content": "Summarize the incident timeline."}],
    routing_mode="AUTO",
    intervention_mode="OBSERVE",
)

print(response.choices[0].message.content)
print(response.asahio.model_used)
print(response.asahio.savings_usd)

Compatibility aliases

The SDK still supports one deprecation window for older imports:

from asahi import Asahi
from acorn import Acorn

Both aliases forward to the canonical ASAHIO client.

Client options

  • routing_mode: AUTO, GUIDED, or EXPLICIT
  • intervention_mode: OBSERVE, ASSISTED, or AUTONOMOUS
  • agent_id: bind a call to a registered agent
  • session_id: bind a call to an agent session
  • model_endpoint_id: target a BYOM endpoint
  • org_slug: sends X-Org-Slug for multi-tenant dashboard setups

Response metadata

Canonical metadata lives at response.asahio.

Legacy code can still read response.asahi during the migration window.

Streaming

stream = client.chat.completions.create(
    messages=[{"role": "user", "content": "Count to five."}],
    stream=True,
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

The streaming parser ignores the gateway's trailing event: asahio metadata event so chunk iteration stays OpenAI-compatible.

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

asahio-0.1.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.

asahio-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file asahio-0.1.0.tar.gz.

File metadata

  • Download URL: asahio-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for asahio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12801fcb8a967a88429a8e20fa0e246a9875578bf5e142fb60277a0dcc4e26d2
MD5 4b1fb87ecf3abe5d1070b7bf18cba9ab
BLAKE2b-256 b754a64cf4bb288f3992b5e81188912735b8ff3ba5fedbee1e702e86b660eadb

See more details on using hashes here.

File details

Details for the file asahio-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: asahio-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for asahio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2639bf9126e4d86603b1b171a233748a93ae342299f6dacf127c8b923826b61
MD5 b3bf48a826d71a12a41e36f049c30fa9
BLAKE2b-256 33b7f9449af55076d30720ff0b59a6e78b345e3fcb6e1506ed5476eba80ba90b

See more details on using hashes here.

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