> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Guardrails

> Examples for input/output safety checks and policy enforcement.

| Example | Description |
| - | - |
| [Custom Guardrail](https://agno-v2.mintlify.site/examples/agents/guardrails/custom-guardrail.md) | Subclass BaseGuardrail and raise InputCheckError to block security-abuse prompts as a pre-hook. |
| [OpenAI Moderation](https://agno-v2.mintlify.site/examples/agents/guardrails/openai-moderation.md) | Block flagged input with OpenAIModerationGuardrail as a pre-hook, including custom category lists and image moderation. |
| [Output Guardrail](https://agno-v2.mintlify.site/examples/agents/guardrails/output-guardrail.md) | Reject responses under 20 characters with a post-hook that raises OutputCheckError. |
| [PII Detection](https://agno-v2.mintlify.site/examples/agents/guardrails/pii-detection.md) | Block SSNs, credit cards, emails, and phone numbers with PIIDetectionGuardrail, or mask them with mask\_pii=True. |
| [Prompt Injection](https://agno-v2.mintlify.site/examples/agents/guardrails/prompt-injection.md) | Block prompt injection and jailbreak attempts with PromptInjectionGuardrail as a pre-hook. |
| [Mixed Hooks and Guardrails](https://agno-v2.mintlify.site/examples/agents/guardrails/mixed-hooks.md) | Combine a logging pre-hook with PIIDetectionGuardrail; blocked runs return RunStatus.error instead of raising. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.