Skip to main content

Runtime trust infrastructure for AI applications — five-pillar evaluation via a single decorator

Project description

VeldrixAI Python SDK

Runtime trust infrastructure for AI applications. Add one decorator to any LLM call — every prompt and response is automatically evaluated across five trust pillars and logged to your VeldrixAI dashboard.

Install

pip install veldrixai

With provider extras:

pip install veldrixai[openai]       # OpenAI SDK support
pip install veldrixai[anthropic]    # Anthropic SDK support
pip install veldrixai[langchain]    # LangChain support
pip install veldrixai[all]          # All providers

Quickstart

from veldrixai import Veldrix
from litellm   import completion

veldrix = Veldrix(api_key="vx-live-...")

@veldrix.guard
def chat(messages):
    return completion(model="openai/gpt-4o", messages=messages)

response = chat([{"role": "user", "content": "Hello"}])
print(response.choices[0].message.content)   # unchanged
print(response.trust.verdict)                # ALLOW
print(response.trust.overall)                # 0.94

What gets evaluated automatically

Pillar What it checks
Safety Toxicity, harmful content
Hallucination Factual accuracy and grounding
Bias & Fairness Demographic bias, stereotyping
Prompt Security Jailbreaks, prompt injection
Compliance / PII GDPR, HIPAA, PII exposure

Every result is logged to your dashboard at https://app.veldrixai.ca automatically.

Works with any LLM framework

  • OpenAI SDK, Azure OpenAI
  • Anthropic (Claude)
  • Google Gemini / Vertex AI
  • AWS Bedrock
  • Cohere, Mistral, Groq, Together AI, Fireworks AI
  • DeepSeek, Qwen, Zhipu AI, Moonshot AI
  • LiteLLM, LangChain, LlamaIndex
  • Ollama, vLLM, LocalAI
  • Any function that returns a string or chat completion object

Sync evaluation (scripts, Jupyter, Django)

trust = veldrix.evaluate_sync(
    prompt="What is the capital of France?",
    response="Paris is the capital of France.",
)
print(trust.verdict, trust.overall)

Async evaluation

trust = await veldrix.evaluate(
    prompt="What is the capital of France?",
    response="Paris is the capital of France.",
)

Block harmful responses automatically

from veldrixai import GuardConfig, VeldrixBlockError

@veldrix.guard(config=GuardConfig(block_on_verdict=["BLOCK"]))
def chat(messages):
    return completion(model="openai/gpt-4o", messages=messages)

try:
    response = chat(messages)
except VeldrixBlockError as e:
    return "I can't help with that."

Async decorator

@veldrix.guard
async def chat(messages):
    return await async_openai_client.chat.completions.create(...)

response = await chat(messages)
print(response.trust.verdict)

Global HTTP intercept (zero code changes)

from veldrixai import Veldrix
from veldrixai.http_interceptor import enable_global_intercept

veldrix = Veldrix(api_key="vx-live-...")
enable_global_intercept(veldrix)

# Use ANY AI SDK as normal — all calls are monitored automatically

FastAPI middleware

from veldrixai.middleware import VeldrixMiddleware

app.add_middleware(VeldrixMiddleware, api_key="vx-live-...")

Flask

from veldrixai.middleware import init_flask

init_flask(app, api_key="vx-live-...")

Requirements

  • Python 3.10+
  • httpx >= 0.27
  • pydantic >= 2.0

Links

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

veldrixai-1.0.1.tar.gz (63.3 kB view details)

Uploaded Source

Built Distribution

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

veldrixai-1.0.1-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file veldrixai-1.0.1.tar.gz.

File metadata

  • Download URL: veldrixai-1.0.1.tar.gz
  • Upload date:
  • Size: 63.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for veldrixai-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5dce466ec66cf57e6b849c3eb3a123745f8d4be5eb1c1a959ff7f231da96933d
MD5 e49eb27f5de20224491334143eb39560
BLAKE2b-256 81c482731ea30da83fbc854a3b1137440f9ea927bc3c6fe3b51c0b692924a1e5

See more details on using hashes here.

File details

Details for the file veldrixai-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: veldrixai-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 53.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for veldrixai-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f7514d2bab2cb122eb0fb5a0f7d5c53d75c38daeb4829db9f8e7423c2f0d38c
MD5 7bb237467c522d1156590a0bbf5101cb
BLAKE2b-256 cd8e252474ba7c71f70ec2fcdc2b1da1be87fdbbf7c2af93afd7b2510da1a5b1

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