Python SDK for Ajah — self-hosted LLM observability gateway
Project description
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
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 ajah_sdk-0.1.0.tar.gz.
File metadata
- Download URL: ajah_sdk-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3e421c01f6b4cf41533c77b461da56319a77d0c214c24d4b96b5d310aba6f8b
|
|
| MD5 |
17cac4dfd6f93b138cbec5bfb09ef797
|
|
| BLAKE2b-256 |
50645720d89ddc5a278d5e514c8849bf5dc7d424b5b7b54685adb3e63e11089d
|
File details
Details for the file ajah_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ajah_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebeabb5aa10e885d459adff446c04944ff238ba440afe183c2938e730dc94cd0
|
|
| MD5 |
539748c8a61405fbf14f4cf6e28486eb
|
|
| BLAKE2b-256 |
fceb72fc8d14fa79004209b23bd0d05a09770b49581e942ec8f09bab863cdf8e
|