Claude Code model router
Datafog Python
Offline PII firewall for AI agents and LLM apps: fast local detection and redaction, Claude Code hook, LiteLLM guardrail. Zero network calls, one dependency.
Install
/plugin marketplace add DataFog/datafog-claude-pluginFound in the project README. Check it for setup steps after installing.
git clone https://github.com/DataFog/datafog-python.gitFrom the README
DataFog Python
DataFog is a Python library for detecting and redacting personally identifiable information (PII).
It provides:
- Fast structured PII detection via regex
- An offline PII firewall for AI agents: a Claude Code hook and a LiteLLM
gateway guardrail (introduced in 4.6)
- Optional NER support via spaCy and GLiNER
- A simple agent-oriented API for LLM applications
- Backward-compatible DataFog and TextService classes
Agent & Gateway Firewall
DataFog includes two ready-made enforcement points that catch PII at the
moment it would leave your machine — offline, in microseconds, with matched
values never echoed into logs or transcripts:
- Claude Code hook (datafog-hook): gates agent tool calls (shell
commands, web requests, file writes, MCP tools) and warns the model when
prompts or tool results carry PII. ~70–90ms per invocation including
process startup. Easiest install is the
Claude Code plugin:
Manual hook setup and limitations: examples/claude_code_hook/.
- LiteLLM guardrail (DataFogGuardrail): redacts or blocks PII in
requests and responses at the gateway, for any LiteLLM-proxied provider.
In-process (~40µs per message scanned; a request clears the guardrail in
well under a millisecond), no sidecar service. Setup:
examples/litellm_guardrail/.
Both default to the high-precision entity set (EMAIL, PHONE,
CREDIT_CARD, SSN); noisier types are opt-in. Known-safe values can be
exempted with an allowlist: scan(text, allowlist=[...]) for exact values,
allowlist_patterns=[...] for full-match regexes (e.g. ^\d{10}$ to stop
unix timestamps matching as phone numbers) — available in both adapters and
the API. Presidio-style entity names (EMAIL_ADDRESS, PHONE_NUMBER,
US_SSN) are accepted as aliases for easy migration.
Every performance number…Details
- Repository
- DataFog/datafog-python
- Website
- datafog.ai
- Language
- Python
- License
- MIT
- Last updated
- 30 October 2026
- Topics
- agent-securityai-agentsanonymizationclaude-codecompliancedata-privacydata-protectionde-identificationguardrailslitellmllmllm-security
FAQ
What is Datafog Python?
Offline PII firewall for AI agents and LLM apps: fast local detection and redaction, Claude Code hook, LiteLLM guardrail. Zero network calls, one dependency. It is a model router for Claude Code, from DataFog/datafog-python on GitHub.
How do I install Datafog Python?
Run /plugin marketplace add DataFog/datafog-claude-plugin inside Claude Code, then follow the setup in the README.
Is Datafog Python popular?
DataFog/datafog-python has 80 GitHub stars and 15 forks. It was last updated on 30 October 2026.
More model routers & proxies
Openrouter Proxy
77aaravarr/openrouter-proxy
A zero-dependency proxy that unlocks free Xiaomi MiMo on OpenRouter for any client, and fixes SSE streaming issues with the VS Code Claude Code extension.
Claudex
74StringKe/claudex
Multi-instance Claude Code manager with intelligent translation proxy. Use Claude Code with Grok, ChatGPT, DeepSeek, Gemini, Kimi, GLM, Ollama and more.
Llm Interceptor
81chouzz/llm-interceptor
A MITM proxy tool to intercept, analyze and log AI coding assistant (Claude Code, Open Code, etc.) communications with LLM APIs
Hewn Forge
116kaderkck/hewn-forge
HEWN 2.0 2026: AI Output Router for Precision Summaries & Polished Code
Starbase
84bstaruk/starbase
⭐ A front-end starter kit and Claude Code boilerplate -- built on Vite 8, TypeScript 6, Tailwind 4, TanStack Router, and TanStack Query.
Cloud CLI Proxy
73ZaneL1u/cloud-cli-proxy
更强大的 Claude Code Wrapper,通过容器化将你包装成一个地地道道的美国人,从根源上规避 Claude Code 风控。
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.