Ajah Python SDK
Python SDK for Ajah — self-hosted LLM observability gateway.
Installation
pip install ajah-sdk
Quick Start
from ajah import AjahClient
client = AjahClient( gateway_url="http://localhost:8080", api_key="your-groq-key", feature_name="my-app", user_id="user-123", )
response = client.chat( model="llama-3.3-70b-versatile", messages=[{"role": "user", "content": "Hello"}], ) print(response.choices[0].message.content)
Session Tracking
with client.session() as session: response1 = session.chat( model="llama-3.3-70b-versatile", messages=[{"role": "user", "content": "Plan a trip"}], step_name="step-1-planner", ) response2 = session.chat( model="llama-3.3-70b-versatile", messages=[{"role": "user", "content": "Book flights"}], step_name="step-2-booker", ) print(f"Session dashboard: {session.dashboard_url}")
Configuration
| Parameter | Description | Default |
|---|---|---|
| gateway_url | Ajah gateway URL | http://localhost:8080 |
| api_key | Your LLM provider API key | required |
| feature_name | Feature name for cost attribution | "default" |
| user_id | User ID for cost tracking | "anonymous" |
What You Get
- Cost attribution per feature and model
- Hallucination risk scoring on every response
- RAG verification against source documents
- Narrative drift detection across sessions
- PII masking before storage
- Full session traces in the dashboard
Self-Hosted
git clone https://github.com/VigneshReddy-afk/ajah cd ajah docker-compose up -d
MIT License · GitHub · useajah.com
Release files for ajah-sdk 0.1.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 | |
|---|---|---|---|
| ajah_sdk-0.1.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ajah_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / ajah_sdk-0.1.0.tar.gz
| Download URL | ajah_sdk-0.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3e421c01f6b4cf41533c77b461da56319a77d0c214c24d4b96b5d310aba6f8b
|
|
BLAKE2b-256 checksum How to use checksums |
50645720d89ddc5a278d5e514c8849bf5dc7d424b5b7b54685adb3e63e11089d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / ajah_sdk-0.1.0-py3-none-any.whl
| Download URL | ajah_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebeabb5aa10e885d459adff446c04944ff238ba440afe183c2938e730dc94cd0
|
|
BLAKE2b-256 checksum How to use checksums |
fceb72fc8d14fa79004209b23bd0d05a09770b49581e942ec8f09bab863cdf8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|