Guardrails AI
Open-source validation framework for LLM inputs and outputs
Guardrails AI is profiled here as a Testing tool for engineering teams. Read about features, pricing, and how it compares to related options in the tools directory.
Description
Guardrails AI is an open-source Python framework founded in 2023 by Shreya Rajpal and Diego Oppenheimer. It wraps LLM calls with input and output guards that detect risks such as PII exposure, toxic language, and ungrounded claims, then fixes, filters, or retries the response according to policy. Validators install individually from a community hub, so applications carry only the checks they need. Guards run inside the application process or centrally through the server, so one policy definition covers every service that calls a model.
Key Capabilities:
Input and output validation with configurable corrective actions
Guardrails Hub library of validators for PII, toxicity, grounding, and jailbreaks
Structured output enforcement through Pydantic models
Streaming validation for token-by-token responses
Server mode exposing guarded, OpenAI-compatible endpoints
Apache 2.0 license with Python SDK
Alternative tools
- AgentOps
Session replay and cost tracking for AI agents
- E2B
Secure cloud sandboxes for running AI-generated code
- Lakera
Runtime security for LLM and agent applications
- Pulumi
Infrastructure as code in general-purpose programming languages
- garak
Vulnerability scanner for large language models
- Momentic
AI-powered end-to-end testing written in plain English
