cd /news/developer-tools/i-published-pip-install-ajah-sdk-and… · home topics developer-tools article
[ARTICLE · art-33017] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

I published pip install ajah-sdk and npm install ajah-sdk — here's what they do

A developer released Python and Node.js SDKs for Ajah, an open-source self-hosted LLM observability gateway. The SDKs simplify integration by replacing manual header injection with a single import, enabling features like hallucination scoring, cost attribution, and PII masking. Ajah runs locally via Docker, ensuring data privacy under an MIT license.

read2 min views1 publishedJun 18, 2026

After two weeks of building Ajah — an

open-source self-hosted LLM observability

gateway — today I hit a milestone that

actually matters for developer adoption.

pip install ajah-sdk

npm install ajah-sdk

Both are live. Both work. Here's what

they do and why I built them.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

THE PROBLEM THEY SOLVE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Ajah is a gateway proxy that sits between

your app and any LLM provider. It scores

every response for hallucination risk,

verifies RAG outputs, detects narrative

drift across sessions, attributes costs

per feature, and masks PII before storage.

Before the SDKs, using Ajah required:

Now it's one import.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

PYTHON SDK

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

pip install ajah-sdk

from ajah import AjahClient

client = AjahClient(

gateway_url="[http://localhost:8080](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"}],

)

Every call through the SDK automatically

injects the Ajah observability headers:

X-Feature-Name, X-User-ID, X-Session-ID,

X-Agent-Step

These headers drive the entire Ajah

pipeline — cost attribution, quality

scoring, PII detection, session tracing.

Session tracking for multi-turn agents:

with client.session() as session:

plan = session.chat(

model="llama-3.3-70b-versatile",

messages=[{"role": "user",

"content": "Plan research"}],

step_name="step-1-planner",

)

research = session.chat(

model="llama-3.3-70b-versatile",

messages=[{"role": "user",

"content": "Execute plan"}],

step_name="step-2-researcher",

)

print(f"View session: {session.dashboard_url}")

AjahSession automatically increments step

numbers, maintains the session ID across

turns, and gives you a direct URL to the

visual step tree in the Ajah dashboard.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

NODE.JS SDK (TYPESCRIPT) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

npm install ajah-sdk

import { AjahClient } from 'ajah-sdk'

const client = new AjahClient({

gatewayUrl: '[http://localhost:8080](http://localhost:8080)',

apiKey: process.env.GROQ_API_KEY!,

featureName: 'my-app',

userId: 'user-123',

})

const response = await client.chat({

model: 'llama-3.3-70b-versatile',

messages: [{ role: 'user',

content: 'Hello' }],

})

Full TypeScript types included.

AjahSession works the same way:

const session = client.session()

const r1 = await session.chat({

model: 'llama-3.3-70b-versatile',

messages: [...],

stepName: 'step-1-planner',

})

console.log(session.dashboardUrl)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

WHAT RUNS BEHIND THE SDK

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Every call through the SDK goes through

the Ajah gateway which runs:

Hallucination scoring — sentence

transformers evaluate every response

for factual grounding. Async. Zero latency added.

Claim density detection — flags responses

that make many specific claims on

low-context prompts.

Linguistic hedge detection — flags

overconfident responses on complex

medical, legal, or financial questions.

Narrative drift detection — compares

claims across session turns. Flags

when a model reverses position.

Cost attribution — USD cost per call,

tracked by feature and model.

PII masking — emails, phones, SSNs,

credit cards masked before storage.

RAG verification — if you pass source

documents, responses are verified

against them. Contradictions flagged.

Prometheus metrics — all signals exposed

at /metrics for Grafana integration.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

SELF-HOSTED

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The SDK points at your own running Ajah

instance. No data goes through my servers.

git clone https://github.com/VigneshReddy-afk/ajah cd ajah

docker-compose up -d Then use the SDK pointing at localhost:8080.

MIT license. Free forever.

→ pip install ajah-sdk

→ npm install ajah-sdk

→ github.com/VigneshReddy-afk/ajah

→ useajah.com

── more in #developer-tools 4 stories · sorted by recency
── more on @ajah 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-published-pip-inst…] indexed:0 read:2min 2026-06-18 ·