--- id: argus-redact version: "0.8.14" license: Apache-2.0 license_treatment: permissive maintenance: active --- # argus-redact — Encrypt PII, not meaning. Locally. License: permissive · Maintenance: active · Downloads: 89.6K/mo ## What it is and what it does argus-redact is a local PII detection and pseudonymization library designed to sit between user input and large language models. It scans text through up to three collaborative layers—fast regex matching, statistical NER, and optional local LLM inference—to identify sensitive data (names, phone numbers, ID numbers, medical terms, and 78 other PII types) and replace them with reversible pseudonyms. Each call generates fresh random keys, so the same original data produces different pseudonyms every time, protecting against fixed-pseudonym deanonymization attacks. The library preserves semantic meaning: names become codes like 'P-83811', phone numbers show partial digits ('138****5678'), and ID numbers become type-prefixed codes ('ID-03292'). You can restore the original text verbatim using the per-message key, or let the LLM work with pseudonymized data. Three deployment modes trade latency for detection depth: 'fast' (sub-millisecond, regex only), 'ner' (10–100ms, adds entity recognition), and 'auto' (20s, includes local LLM). Chinese receives deepest support; English, Japanese, Korean, German, Ukrainian, and Indonesian add regex plus NER; Brazilian Portuguese is regex-only. Use it for: - Redact user queries before sending to a third-party LLM API, then restore the response in a guarded round-trip to keep PII local. - Audit text for privacy risk before it enters a data pipeline, using the risk-scoring API to flag documents with critical or high-severity PII. - Preprocess customer support tickets or medical notes for internal AI analysis while ensuring sensitive fields never cross the network boundary. - Generate synthetic training data by redacting real documents and replacing pseudonyms with plausible alternatives, preserving linguistic patterns. - Implement a privacy gateway that runs 'fast' mode inline for low-latency LLM proxies and 'auto' mode asynchronously in a parallel audit lane. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Detects and redacts personally identifiable information (PII) in text using regex, NER, and optional local LLM layers, replacing sensitive data with reversible pseudonyms while preserving meaning for downstream AI systems. Yes, with conditions. Install if you need reversible, per-message-key pseudonymization for LLM pipelines and can tolerate medium install friction. Actively maintained, Apache-2.0 licensed, no known vulnerabilities. Do not rely on it as a compliance anonymization tool—it is a data minimization aid. Fast mode will miss obfuscated or novel PII variants; NER and LLM modes are statistical. Restore without a guarded anchor is not secure. Best for workflows where you control both redaction and restoration. ## Install pip install argus-redact uv add argus-redact poetry add argus-redact ## Installing argus-redact Before you install: Medium install friction: compiled wheels available for Python 3.10–3.12 across macOS, Linux, and Windows. Depends on pyyaml and requests. Active maintenance with latest release on 2026-08-14. License in practice: Apache-2.0 (permissive): you can use, modify, and distribute freely in commercial and private projects, provided you include a copy of the license and state material changes. Quickstart: pip install argus-redact from argus_redact import redact redacted, key = redact( "My phone is 13812345678 and ID is 110101199003074610", lang="en" ) print(redacted) print(key) Requires Python 3.10 or later. The 'auto' mode is computationally expensive (~20s per document) and unsuitable for interactive request paths. Verify before relying: - Exact performance and miss rates for English PII detection versus the Chinese benchmarks cited in the description. - Whether the 'restore' function's guarded mode (default as of v0.8.0) is sufficient for production security in adversarial settings. - How well NER generalizes to informal, typo-heavy, or minority-language names outside documented language support. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 89.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags PII redaction for LLM pipelines, reversible pseudonymization, local privacy layer, encrypt PII before sending to AI, detect and mask sensitive data, Chinese name and ID redaction, privacy-preserving text preprocessing, pii-detection, llm-privacy, reversible-pseudonymization [View on SkillFed](https://skillfed.io/packages/argus-redact) · [View on PyPI](https://pypi.org/project/argus-redact/)