Disclaimer: Yes, this post was created with the help of AI — why not?
Every message a user sends to your AI system is a small privacy risk in disguise. Names, phone numbers, email addresses — they travel along with the actual request, often ending up in logs, databases, and third-party services where they were never meant to go. I built a small service to solve this at the source: strip personal data from text before it moves anywhere.
The Problem Is Not Awareness — It Is Timing Link to heading
Most teams know they should protect personal data. The challenge is doing it automatically, at the right moment, without slowing everything down. Regulations like GDPR and CCPA make this a legal requirement, but the practical case is stronger: data you never store in an identifiable form cannot be breached or misused later.
The natural insertion point is the entry gate — before text reaches a language model, a log collector, or an analytics pipeline.
What the Tool Does Link to heading
app-presidio wraps Microsoft’s open-source Presidio engine — an AI-powered system that detects personal information across dozens of entity types and multiple languages — in a lightweight REST API and a command-line interface. The interaction is simple:
Input: "Hello, I'm John Doe and my email is john@example.com"
Output: "Hello, I'm <PERSON> and my email is <EMAIL_ADDRESS>"
No regular expressions to write, no lookup lists to keep up to date. The underlying AI model handles recognition; the anonymiser replaces each detected item with a neutral label. You can also inspect what was detected before replacing it, and set a confidence threshold to filter out low-certainty matches.
Why Running It Yourself Matters Link to heading
Sending sensitive data to a third-party anonymisation API defeats the purpose. The whole point is keeping personal information out of external systems — and a hosted SaaS tool is an external system.
This service runs entirely inside your own infrastructure. Spin it up with docker compose up and the raw text never crosses your network boundary. The scrubbed version continues down the pipeline; everything identifying stays behind.
Where It Fits in a Real Workflow Link to heading
A few places where an anonymisation step pays off immediately:
- Before an LLM call — strip names and contact details from user messages before they reach any external model provider.
- Analytics and logging — remove PII from event logs and support tickets before they land in a data warehouse or monitoring tool.
- Internal search — let teams search conversation history without exposing raw personal details in query results.
Production-Ready by Design Link to heading
The project ships with a Helm chart for Kubernetes, a GitLab CI pipeline that tests every commit and publishes a fresh container image, and a public health endpoint that orchestrators can probe without credentials. Scaling out is a one-line change to replica counts. The API key mechanism keeps the anonymisation endpoint protected while leaving the health check open for probes.
Privacy works best as a default step, not an afterthought. Wiring this in early means the rest of the pipeline never has to think about it.
The full project is open: gitlab.com/carlessanagustin/app-presidio