Skip to main content
Use Agno’s built-in PII detection guardrail to block personally identifiable information before it reaches the model. A blocked call returns a run with RunStatus.error; the guardrail exception is handled inside the run.
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