guardrails-ai/guardrails
A Python library for validating, controlling, and ensuring safety of LLM outputs by enforcing structured schemas and custom rules.

Velocity · 7d
+5.7
★ / day
Trend
→steady
star history
Guardrails provides a framework for developers to define expected output formats, validate responses against custom logic, and prevent undesired content from language models. It wraps LLM calls with validation layers that check structure, type safety, and content policy compliance, returning structured data or retrying generation when outputs fail validation criteria.