> ## 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.

# PIIDetectionGuardrail

> Guardrail that detects and optionally masks PII such as SSNs, credit cards, emails, and phone numbers.

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `mask_pii` | `bool` | `False` | Whether to mask the PII in the input, rather than raising an error. |
| `enable_ssn_check` | `bool` | `True` | Whether to check for Social Security Numbers. |
| `enable_credit_card_check` | `bool` | `True` | Whether to check for credit cards. |
| `enable_email_check` | `bool` | `True` | Whether to check for emails. |
| `enable_phone_check` | `bool` | `True` | Whether to check for phone numbers. |
| `custom_patterns` | `Optional[Dict[str, Union[str, re.Pattern]]]` | `None` | Custom PII patterns to detect, mapping a name to a regex string or compiled pattern. Added to the default patterns. |


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