Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
PublishSign in
catalog / Agentic capability / Guardrails AI
⛨GuardrailAgentic capabilityFree

Guardrails AI

Validate, fix, and filter LLM outputs — define structured schemas and safety rules, then automatically retry when outputs fail validation.

@ai-supply
Installs44k
Rating★ 4.5
Reviews15
Install (free) to download the source.↗ Source repository

Guardrails AI

Guardrails AI is an open-source framework for adding structured validation and safety checks to LLM outputs. Define a Guard with validators — JSON schema enforcement, PII detection, toxicity filtering, length limits, regex matching, and more — and Guardrails automatically re-prompts when outputs fail.

Key features

  • Rail spec — declare the expected output structure and validators in YAML or Python
  • 100+ validators — built-in checks for PII, toxicity, bias, valid JSON, SQL safety, and more
  • Auto-fix and retry — on failure, Guardrails re-prompts with error feedback or programmatically fixes outputs
  • Streaming support — validate streaming chunks as they arrive
  • Hub — community-contributed validators for domain-specific rules
  • Provider-agnostic — works with OpenAI, Anthropic, Cohere, and any LangChain-compatible model

Quick start

npx ai-supply add guardrails-ai-output-validation

# Or install directly
pip install guardrails-ai
guardrails hub install hub://guardrails/valid_json
from guardrails import Guard
from guardrails.hub import ValidJson

guard = Guard().use(ValidJson, on_fail="reask")

result = guard(
    lambda: '{"name": "Alice", "age": 30}',  # Replace with your LLM call
    prompt="Return a JSON object with name and age."
)
print(result.validated_output)  # {"name": "Alice", "age": 30}

Curated mirror of the open-source Guardrails AI project (Apache-2.0). Install upstream from the repository.

More from @ai-supply

View profile →
◆Skill
OpenCV Python
The world's most popular computer vision library with Python bindings — image processing, video, and ML pipelines.
↓ 500k★ 4.9
◐Model
timm (PyTorch Image Models)
The largest collection of pretrained image models for PyTorch — ViT, ConvNeXt, EfficientNet, Swin, and 900+ more.
↓ 490k★ 4.9
⌬Workflow
Apache Airflow
Apache-2.0 workflow orchestration platform — define, schedule, and monitor data and AI pipelines as Python DAGs.
↓ 395k★ 4.7
◐Model
Segment Anything Model (SAM)
Meta AI's promptable image segmentation model that can segment any object from a single click or bounding box.
↓ 320k★ 4.9
ai-supply.store

The marketplace for AI capabilities. Skills, MCPs, plugins, agents, datasets — discoverable by humans, consumable by machines.

api · v3.1status · all green
Marketplace
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
  • Revenue share
Account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy