dataiku/kiji-proxy
Privacy proxy for your OpenAI requests
📦 Project Overview
Kiji Privacy Proxy is an open‑source, privacy‑first proxy that sits between your application (or browser) and AI service APIs such as OpenAI, Anthropic, Gemini, or Mistral. It automatically detects personally identifiable information (PII) in outgoing prompts, replaces it with realistic dummy values, forwards the masked request, then restores the original data in the response. All detection runs locally on a lightweight DistilBERT model (ONNX‑optimized), so no sensitive text ever leaves your machine.
🎯 Core Use‑Cases
| Who might use it | Why it helps |
|---|---|
| Developers building AI‑powered apps | Prevent accidental leakage of customer data when sending prompts to external LLM APIs. |
| Data‑science teams | Clean logs or training data before feeding them to LLMs, staying compliant with GDPR, HIPAA, CCPA, etc. |
| Support engineers | Use ChatGPT for ticket triage without exposing real user emails, phone numbers, or credit‑card numbers. |
| Security / compliance officers | Enforce a transparent, auditable layer that masks 26 built‑in PII types and lets you add custom regex rules. |
🛠️ Main Features (as described in the README)
| Feature | What it does |
|---|---|
| Automatic PII detection | ML‑powered DistilBERT model (ONNX) recognises 26 entity types (email, SSN, credit‑card, phone, address, etc.). |
| Seamless masking & restoration | Detected values are swapped for dummy data before the request leaves the proxy; the original values are re‑inserted into the LLM’s response. |
| Zero‑code integration | Runs as a local HTTP proxy (default :8081). macOS app automatically installs a PAC file so browsers route api.openai.com etc. without manual config. |
| Browser & Chrome extension | Inline PII detection for ChatGPT, Claude, Gemini, etc.; the extension shows masked entities in‑place. |
| Configurable masking | Turn off specific entity types, adjust sensitivity, or add custom regex patterns via the UI or config files. |
| Mapping review UI | Electron desktop UI lists every masked value, lets you delete mappings individually or in bulk. |
| Fast local inference | ONNX‑optimized model gives sub‑100 ms latency for most requests. |
| Cross‑platform delivery | macOS native app (DMG, Homebrew Cask) and Linux server (deb, tarball, systemd service). |
| Docker & systemd support | Ready for production deployment; logs are structured and can be shipped to your observability stack. |
| Privacy‑first design | All PII processing stays on‑device; telemetry is opt‑in and never includes raw prompts. |
| Extensible | You can fine‑tune or replace the model; training data and model are published on HuggingFace. |
🚀 Getting Started (quick‑run summary)
- Install
macOS:
brew install --cask dataiku/tap/kiji-privacy-proxy
Linux: download the.debor tarball from the Releases page and runkiji-proxy(or enable the systemd unit). - Run the proxy – on macOS the app automatically configures a PAC file; on Linux set
HTTP_PROXY/HTTPS_PROXYtohttp://127.0.0.1:8081. - Send a request – e.g.
curl https://api.openai.com/v1/chat/completions …with an email in the prompt. The logs will show the email masked, and the response will contain the original email restored. - Inspect / edit mappings – open the Electron UI to see which values were masked and optionally delete them.
🏗️ Architecture (high‑level)
Your App/CLI ──► Kiji Privacy Proxy (HTTP/HTTPS) ──► LLM Provider API
│ │ Detect + Mask PII │ (masked data only)
│ │ Forward request │
│ │ Receive response │
│ ◄─ Restore original PII ──────────◄
▼ ▼
Result with original‑looking data
- The proxy runs a Go server (
kiji-proxy) that loads the ONNX model via ONNX Runtime. It maintains a per‑request mapping table (dummy ↔ real value) that is used for restoration. - An Electron front‑end reads the same mapping table via a local API, providing a UI for review, deletion, and configuration.
- Optional Unix‑socket listener (
PROXY_UNIX_SOCKET_PATH) lets you run the proxy behind a socket instead of a TCP port.
📚 Documentation & Extensibility
- Full docs –
docs/README.mdwith sections on installation, development, building, release management, advanced topics, Chrome extension, custom model training, masking controls, and coding‑agent integration. - Model & data – Published on HuggingFace (
DataikuNLP/kiji-pii-model-onnx,kiji-pii-model,kiji-pii-training-data). You can fine‑tune or replace the model following the Customizing the PII Model guide. - Custom regex rules – Add domain‑specific patterns via the UI or config file.
- Coding agents – The proxy can be used to route Codex or Claude Code agents, ensuring any generated code that contains PII is also protected.
🤝 Contributing & Community
- Open issues for bugs or feature ideas.
- Pull requests accepted after signing the Dataiku CLA (bot‑guided).
- Documentation improvements, model‑training data contributions, or new partner integrations are all welcome.
- Community channels: GitHub Discussions, Slack (invite link provided), and the usual GitHub stars/forks.
🔒 Security & Privacy
- All PII detection runs locally; no external calls for the model.
- Optional encrypted storage for the dummy↔real mappings.
- Security disclosures should be sent privately to
opensource@dataiku.com.
📦 Release & License
- Latest releases – macOS DMG (
400 MB), Linux tarball (150 MB), Debian/Ubuntu.deb. - CI/CD – GitHub Actions build and test on every push/tag.
- License – Apache 2.0 (permissive, commercial‑friendly).
TL;DR
Kiji Privacy Proxy is a genuine, production‑ready tool that lets developers safely use external LLM APIs without risking accidental exposure of emails, phone numbers, credit‑card numbers, or other PII. It does this by running a local, ONNX‑accelerated transformer model to mask data on the fly, providing a UI for review, and restoring the original content in responses—all with zero code changes to the calling application.
Related
- Project
- Project
- Project
- Project
- Dispatch