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.2.tar.gz (63.5 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.2-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: veldrixai-1.0.2.tar.gz
  • Upload date:
  • Size: 63.5 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.2.tar.gz
Algorithm Hash digest
SHA256 9422dfdcf0b68fe9ce17b06c17dc1379ac15d80dfeef40c8ffcfa6fbfb913685
MD5 8d6c10f02c54cd7b5d60f900c9e18133
BLAKE2b-256 c012a0acb39980bb7713eb92fa8f40cb2e5049dab263187be8220a78d2894612

See more details on using hashes here.

File details

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

File metadata

  • Download URL: veldrixai-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 26e70f15de03170eef7154d7bd1fc14b34c3a32b7110be69784074aa4251f186
MD5 85129722d29e66880f973961b2a7c27f
BLAKE2b-256 e7dd917076b9036479803baecc3fc8fdb8588be4940ffd89336f8ad5d61ae1b8

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