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

Code

pii_detection.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Install libraries

3

Run example