Skip to main content
This example demonstrates how to use Agno’s built-in PII detection guardrail with an Agent. This example shows how to:
  1. Detect and block personally identifiable information (PII) in input
  2. Protect sensitive data like SSNs, credit cards, emails, and phone numbers
  3. Handle different types of PII violations with appropriate error messages
1

Create a Python file

pii_detection.py
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Agent