
What Mask PII Detects
Mask PII analyzes the user’s input and replaces any detected personally identifiable information with a generic placeholder.Examples:
- “My card is 4111 1111 1111 1111” → “My card is [CREDIT_CARD_NUMBER]”
- “I live at 123 Main St, NY” → “I live at [LOCATION]”
- “My email is john.doe@example.com” → “My email is [EMAIL_ADDRESS]”
Configurable PII Categories
Devic allows you to enable or disable specific types of PII to be masked in user inputs.Available types include:
Global Identifiers
- Credit card number
- Cryptocurrency wallet
- Date and time
- Email address
- IBAN
- IP address
- Location
- Medical license number
- Person name
- Phone number
- URL
United States
- Bank account number
- Driver’s license number
- ITIN
- Passport number
- Social Security Number
United Kingdom
- NHS Number
- National Insurance Number

When to Use Mask PII
Mask PII is recommended for agents that:- Process instructions that may contain personal data.
- Operate in regulated environments (GDPR, HIPAA, internal compliance).
- Interact with end users and must avoid storing or forwarding sensitive information.
- Execute automated tasks where data must remain anonymized.
How to Configure It
To enable Mask PII in an agent:- Open the agent from the sidebar panel.
- Click the options menu (⋮) in the upper-right corner.
- Select Guardrails.
- Click Add guardrail.
- Select Mask PII.
- Choose the entities you want to mask.
- Save the configuration.
Next: Moderation
Learn how to block sensitive or inappropriate content using the Moderation guardrail.