You are helping me build the following AI agent workflow. ## Goal Privacy-Minded Router for PII Detection: Detects sensitive PII in chat inputs using risk scoring and routes them through secure local sanitization or cloud LLMs with full audit... ## Specification - What it does: You keep your sensitive personal information safe by having this agent automatically detect PII in your chat inputs and route them through secure local sanitization or compliant cloud models. It ensures full audit trails so you can meet GDPR and HIPAA standards without sacrificing performance on clean data. - Trigger: Triggered by an event (Manual ยท on demand) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Code: Logic and pattern detection - AI Agent: Context-aware classification - Ollama Chat Model: Local LLM processing - Simple Memory: State management - OpenRouter Chat Model: Cloud LLM routing ## Known pitfalls, handle each one explicitly in your implementation 1. Regex patterns can produce false positives on benign text so you must implement a secondary LLM verification step to reduce noise. 2. Local Ollama models may lack the nuance of cloud models for complex PII detection so benchmark them against your specific data set first. 3. Audit logs might inadvertently store raw PII if not carefully scrubbed before persistence so add a sanitization filter to the logging pipeline. 4. Latency spikes can occur when switching between local and cloud endpoints so implement circuit breakers to prevent cascading failures. ## Reference implementation https://n8n.io/workflows/5874 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/ai-privacy-minded-router-for-pii-detection/ via usecasesforagents.com