Documentation

Open Source
Guardrails Framework

Embed safety, compliance, and policy enforcement at the core of every AI workflow — built for production from day one.

Get Started
Production Ready

Ship to production with confidence
and AI-powered validation

Enterprise-grade guardrails that validate every LLM interaction in real time — without sacrificing speed, flexibility, or control.

65+ Open validators
<50ms Avg. latency
100% Self-hosted
LLM providers
Community

Community-driven open source guardrails

65+ pre-built validators covering hallucination, PII, jailbreaks, and content moderation — deploy out of the box or extend with your own.

Universal

Any LLM, any use case, any deployment

OpenAI, Anthropic, Meta, or custom models. Cloud or on-prem. Chatbots, RAG pipelines, and autonomous agent workflows.

One layer between your apps and every LLM

Oloyid sits at the center of your AI stack — validating traffic from any application before it reaches any model provider.

Internal Chat LIVE
RAG App LIVE
Agent Flow LIVE
AI Summaries LIVE
GUARDRAIL ACTIVE
IN 4 streams OUT 3 models
OpenAI SYNC
Anthropic SYNC
Custom LLMs SYNC

What Are Guardrails?

Guardrails are a safety layer between users and large language models. They inspect every input and output before it reaches your users or downstream systems — enforcing rules, validating formats, and automatically correcting or blocking unsafe responses.

Without guardrails, LLMs can hallucinate facts, leak sensitive data, produce toxic content, or return unstructured outputs that break your application. Oloyid solves this as a composable, open source framework you fully control.

Risk Coverage

Built for every
risk category

Six core validation domains — composable, production-tested, and ready to deploy across any LLM workflow in your stack.

PII Schema Injection Safety Hallucination Custom
Critical

PII Detection

Detect and mask names, emails, SSNs, and phone numbers before sensitive data leaves your system.

High

Structured Output

Guarantee valid JSON and schema compliance with automatic retry and corrective re-prompting on failure.

Critical

Prompt Injection

Block jailbreak attempts, adversarial prompts, and instruction-override attacks before they reach your model.

High

Content Safety

Filter toxic language, hate speech, bias, and off-brand content to keep AI responses professional.

High

Hallucination Detection

Validate factual consistency against source documents and catch fabricated claims in real time.

Extensible

Composable Validators

Mix pre-built validators from the hub or write your own in Python — add a new safety check in one line.

65+ validators · Apache 2.0
quickstart.py
# Install Oloyid
pip install oloyid

# Define a guard and wrap your LLM call
from oloyid import Guard
from oloyid.hub import DetectPII, ValidJSON

guard = Guard().use(
    DetectPII(on_fail="fix"),
    ValidJSON(schema=MySchema)
)

response = guard(
    llm_api=openai.chat.completions.create,
    prompt="Summarize this customer ticket..."
)

Start building safe AI applications today

Open source under Apache 2.0 — self-hosted, model-agnostic, production-ready.

Production-ready AI guardrails

Trusted by developers, startups, and teams building AI in production