Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
Sign inSign up free
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
Installs34k
⟳ upstream v0.10.2 · updated 1mo ago
↗ Source repository
← More Agentic capabilityAgentic capability leaderboard →How we grade security →Source ↗
! Grade B · 88/100 · ReviewSecurity assessment
✓No compromise signals16capabilities surfaced1known CVE5of 20 OWASP controls clear
Potentially unbounded loopBroad capability surfaceSuspicious network referencesVulnerable dependencies
scanned 16d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

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.

Rating rank
#1
of 35 in Agentic capability
Install rank
#31
of 35 in Agentic capability
Security score
88/100 · B
review
Security rank
#13
of 35 in Agentic capability
Installs
34k
cat avg 186k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Agentic capability leaderboard →
! Security: Review · 8888/100 · grade Bscanned 16d ago
✓ no compromise signals17 risk-surface · 10/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

Control card · high confidence (static)
framework: guardrails-aiframework: langsmithframework: pytestframework: presidiocovers: secrets-leakcovers: toxicitycovers: piicovers: jailbreakcovers: hallucinationcovers: bias
pyrightGuardvalidateguarded_outputvalidate_stream

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM01Prompt Injectionhigh
Adversarial instructions embedded in an artifact that hijack a downstream LLM.
•Prompt-injection phrasing — instruction-subversion language detected · guardrails-ai-guardrails-762c7e6/SECURITY_ADVISORY.md (CWE-77)expected
⚠LLM02Sensitive Information Disclosurehigh
Secrets, credentials or PII shipped inside the artifact.
•Embedded credentials — found: API secret key (sk-) · guardrails-ai-guardrails-762c7e6/docs/examples/secrets_detection.ipynb (CWE-798)expected
•Embedded credentials — found: credentials in URL · guardrails-ai-guardrails-762c7e6/tests/unit_tests/hub/test_validator_package_service.py (CWE-798)expected
⚠LLM03Supply Chainhigh
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 3 pip requirements declared · guardrails-ai-guardrails-762c7e6/server_ci/requirements.txtrisk surface
•Vulnerable dependencies — 14 known vulnerabilities in: nltk@3.9.4, sqlitedict@2.1.0, idna@3.9.0, pygments@2.9.0, tqdm@4.9.0 (CWE-1395)known CVE · -12 pts
⚠LLM05Improper Output Handlinghigh
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Suspicious code patterns — dynamic code execution · guardrails-ai-guardrails-762c7e6/docs/examples/bug_free_python_code.ipynb (CWE-95)expected
•Suspicious code patterns — OS command execution · guardrails-ai-guardrails-762c7e6/guardrails/cli/hub/utils.py (CWE-78)expected
•Suspicious code patterns — destructive rm -rf / · guardrails-ai-guardrails-762c7e6/server_ci/Dockerfile (CWE-78)expected
⚠LLM06Excessive Agencyhigh
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 4 distinct host(s) · guardrails-ai-guardrails-762c7e6/.github/ISSUE_TEMPLATE/config.ymlexpected
•External endpoints declared — 1 distinct host(s) · guardrails-ai-guardrails-762c7e6/.github/actions/validator_pypi_publish/action.ymlexpected
•External endpoints declared — 16 distinct host(s) · guardrails-ai-guardrails-762c7e6/README.mdexpected
•External endpoints declared — 2 distinct host(s) · guardrails-ai-guardrails-762c7e6/docs/examples/extracting_entities.ipynbexpected
•External endpoints declared — 3 distinct host(s) · guardrails-ai-guardrails-762c7e6/docs/examples/no_secrets_in_generated_text.ipynbexpected
•Broad capability surface — 3 high-impact capability categories referenced — verify least-privilege · guardrails-ai-guardrails-762c7e6/guardrails/hub/validator_package_service.py (CWE-272)risk surface
•Egress to a private/loopback host — 127.0.0.1 · guardrails-ai-guardrails-762c7e6/server_ci/tests/test_server.py (CWE-918)expected
•External endpoints declared — 5 distinct host(s) · guardrails-ai-guardrails-762c7e6/tests/integration_tests/test_assets/python_rail/llm_output_2_succeed_gd_but_fail_pydantic_validation.txtexpected
⚠LLM07System Prompt Leakagehigh
Secrets, internal hosts or proprietary logic exposed in shipped prompts.
•Embedded credentials — found: API secret key (sk-) · guardrails-ai-guardrails-762c7e6/docs/examples/secrets_detection.ipynb (CWE-798)expected
•Embedded credentials — found: credentials in URL · guardrails-ai-guardrails-762c7e6/tests/unit_tests/hub/test_validator_package_service.py (CWE-798)expected
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption · guardrails-ai-guardrails-762c7e6/guardrails/call_tracing/sqlite_trace_handler.py (CWE-835)risk surface
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML02Data Poisoninghigh
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
•Prompt-injection phrasing — instruction-subversion language detected · guardrails-ai-guardrails-762c7e6/SECURITY_ADVISORY.md (CWE-77)expected
⚠ML06AI Supply Chainhigh
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 3 pip requirements declared · guardrails-ai-guardrails-762c7e6/server_ci/requirements.txtrisk surface
•Vulnerable dependencies — 14 known vulnerabilities in: nltk@3.9.4, sqlitedict@2.1.0, idna@3.9.0, pygments@2.9.0, tqdm@4.9.0 (CWE-1395)known CVE · -12 pts
⚠ML09Output Integrityhigh
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Suspicious code patterns — dynamic code execution · guardrails-ai-guardrails-762c7e6/docs/examples/bug_free_python_code.ipynb (CWE-95)expected
•Suspicious code patterns — OS command execution · guardrails-ai-guardrails-762c7e6/guardrails/cli/hub/utils.py (CWE-78)expected
•Suspicious code patterns — destructive rm -rf / · guardrails-ai-guardrails-762c7e6/server_ci/Dockerfile (CWE-78)expected
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (6) · hygiene / uncategorized
•Unrecognized file type — '.dockerignore' is not on the allowlist · guardrails-ai-guardrails-762c7e6/.dockerignorerisk surface
•Unrecognized file type — '.gitignore' is not on the allowlist · guardrails-ai-guardrails-762c7e6/.gitignorerisk surface
•Unrecognized file type — '.?' is not on the allowlist · guardrails-ai-guardrails-762c7e6/LICENSErisk surface
•Unrecognized file type — '.rail' is not on the allowlist · guardrails-ai-guardrails-762c7e6/guardrails/applications/text2sql.railrisk surface
•Unrecognized file type — '.template' is not on the allowlist · guardrails-ai-guardrails-762c7e6/guardrails/cli/hub/template_config.py.templaterisk surface
•Suspicious network references — raw IP URL (1 URLs) · guardrails-ai-guardrails-762c7e6/server_ci/tests/test_server.pyrisk surface
✔ verified source · pinned guardrails-ai-guardrails-762c7e6
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/guardrails-ai-output-validation/check). Click a policy:

Consume Guardrails AI programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/guardrails-ai-output-validation

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/guardrails-ai-output-validation/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

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

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/guardrails-ai-output-validation/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "guardrails-ai-output-validation" })
OpenAPI spec →
vlatest
! Security: Review · 881mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

Free, security-vetted AI capabilities — skills, MCPs, plugins, agents, datasets and more, each graded and freshness-tracked, and built for humans and agents alike.

api · v3.1status · all green
Contact
support@ai-supply.storesecurity@ai-supply.store
Catalog
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
  • Security
  • Scan a repo
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
Account
  • Create account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy