Skip to content

Commit 39c1676

Browse files
committed
docs: refresh README for 4.6 — agent firewall section, fix stale version refs and entity labels
1 parent 5dbdffd commit 39c1676

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,30 @@ DataFog is a Python library for detecting and redacting personally identifiable
55
It provides:
66

77
- Fast structured PII detection via regex
8+
- An offline PII firewall for AI agents: a Claude Code hook and a LiteLLM
9+
gateway guardrail (new in 4.6)
810
- Optional NER support via spaCy and GLiNER
911
- A simple agent-oriented API for LLM applications
1012
- Backward-compatible `DataFog` and `TextService` classes
1113

12-
## 4.5 Focus
14+
## Agent & Gateway Firewall (4.6)
1315

14-
DataFog 4.5 is focused on lightweight text PII screening: a small core install,
15-
fast regex-based scan/redact helpers, explicit optional extras, and a clearer
16-
path toward future middleware use cases. Dedicated Sentry, OpenTelemetry,
17-
logging-framework, and cloud DLP adapters are future-facing work and are not
18-
part of the 4.5 release.
16+
DataFog 4.6 adds two ready-made enforcement points that catch PII at the
17+
moment it would leave your machine — offline, in microseconds, with matched
18+
values never echoed into logs or transcripts:
19+
20+
- **Claude Code hook** (`datafog-hook`): gates agent tool calls (shell
21+
commands, web requests, file writes, MCP tools) and warns the model when
22+
prompts or tool results carry PII. ~70ms per invocation including process
23+
startup. Setup and limitations: [examples/claude_code_hook/](examples/claude_code_hook/),
24+
or install via the [Claude Code plugin](https://github.com/DataFog/datafog-claude-plugin).
25+
- **LiteLLM guardrail** (`DataFogGuardrail`): redacts or blocks PII in
26+
requests and responses at the gateway, for any LiteLLM-proxied provider.
27+
In-process (~31µs per request), no sidecar service. Setup:
28+
[examples/litellm_guardrail/](examples/litellm_guardrail/).
29+
30+
Both default to the high-precision entity set (`EMAIL`, `PHONE`,
31+
`CREDIT_CARD`, `SSN`); noisier types are opt-in.
1932

2033
## Installation
2134

@@ -42,7 +55,7 @@ pip install datafog[all]
4255
Python 3.13 support is certified for the core SDK, CLI, `nlp`,
4356
`nlp-advanced`, and `ocr` install profiles. Donut OCR still requires a model
4457
that is available locally before runtime use. `distributed` and `all` are not
45-
newly certified on Python 3.13 in the 4.5 line.
58+
newly certified on Python 3.13 in the 4.x line.
4659

4760
## Quick Start
4861

@@ -117,7 +130,7 @@ Use the engine that matches your accuracy and dependency constraints:
117130

118131
- `regex`:
119132
- Fastest and always available.
120-
- Best for default structured entities: `EMAIL`, `PHONE`, `SSN`, `CREDIT_CARD`, `IP_ADDRESS`, `DATE`, `ZIP_CODE`.
133+
- Best for default structured entities: `EMAIL`, `PHONE`, `SSN`, `CREDIT_CARD`, `IP_ADDRESS`, `DOB`, `ZIP`.
121134
- Use `locales=["de"]` for German structured IDs such as `DE_VAT_ID`, `DE_IBAN`, `DE_TAX_ID`, `DE_POSTAL_CODE`, and passport or residence permit numbers.
122135
- `spacy`:
123136
- Requires `pip install datafog[nlp]`.
@@ -131,7 +144,7 @@ Use the engine that matches your accuracy and dependency constraints:
131144

132145
## Optional OCR And Spark Surfaces
133146

134-
DataFog 4.5 keeps the main package story centered on lightweight text PII
147+
The 4.x line keeps the main package story centered on lightweight text PII
135148
screening. OCR and Spark remain supported optional surfaces for users who
136149
already rely on them, but they are not required for the core import, default
137150
scan/redact helpers, or guardrail helpers.
@@ -151,7 +164,7 @@ scan/redact helpers, or guardrail helpers.
151164
- A Java runtime is required by PySpark.
152165

153166
OCR and Spark are not deprecated. Their broader API and packaging overhaul is
154-
deferred; the 4.5 goal is to keep them explicit, documented, and isolated from
167+
deferred; the 4.x goal is to keep them explicit, documented, and isolated from
155168
the lightweight core path.
156169

157170
## Backward-Compatible APIs

0 commit comments

Comments
 (0)