AI Recipe Guardrails PII
Last updated
The AI Recipe Guardrails PII recipe installs PII (Personally Identifiable Information) protection guardrails for the Drupal AI module. It detects and blocks email addresses, credit card numbers, IBANs, and international phone numbers in both user input to AI agents and AI-generated output.
AI
https://www.drupal.org/project/ai
When an AI agent processes content on behalf of an editor, sensitive identifiers can leak in two directions: into the prompt sent to the AI provider, or back into the rendered AI output displayed to other users. This recipe enables AI module guardrails that scan both sides of the exchange and block messages containing matched PII patterns.
The bundled patterns cover:
Email addresses
Credit card numbers
IBAN (International Bank Account Number) codes
International phone numbers
Provides an abstraction layer for AI services and the guardrail framework used by this recipe.
The recipe imports the full set of AI module guardrail configurations:
After install, manage individual PII guardrail rules at Admin → AI → Configuration → Guardrails.
Apply the recipe using Drush:
This recipe is bundled into Varbase AI Safety and is applied automatically when that recipe is used.
Last updated
config:
strict: false
import:
ai: '*'ddev drush recipe ../recipes/ai_recipe_guardrails_pii