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

Inside Claude Code
/plugin marketplace add DataFog/datafog-claude-plugin

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/DataFog/datafog-python.git

From 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…
Read the full README on GitHub

Details

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

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.