NewHand your logs to an auditor — they can check them without us
[CloakLLM]

Cloak your prompts. Prove your compliance.

Open-source PII protection middleware for LLMs. Detect sensitive data, replace it with reversible tokens, and maintain tamper-evident audit logs — all before your prompts leave your infrastructure. And every artifact verifies independently: your auditor checks the evidence with a standalone tool, without trusting our code.

PyPI DownloadsPyPI Downloads (MCP)npm Downloads
Python
$ pip install cloakllm
JavaScript
$ npm install cloakllm
CloakLLM Demo
CloakLLM 30-second demo showing PII detection and tokenization

Protect. Prove. Verify.

Compliance you can verify beats compliance you're asked to believe — so every layer of CloakLLM produces evidence that checks out independently.

Protect

Detect PII in prompts and replace it with reversible tokens — before anything leaves your infrastructure. 3-pass detection, 13 locales, streaming-safe.

How it works

Prove

Tamper-evident, hash-chained audit logs with zero original PII, signed certificates, trusted timestamps, and EU AI Act compliance reports with an honest per-article coverage matrix.

Read the docs

Verify

A standalone verifier your auditor runs on their own machine — checking the chain, timestamps, signatures, and reports without our SDK and without trusting our code.

For auditors

Your LLM prompts are plaintext confessions.

Every API call to an LLM sends raw customer data — names, emails, SSNs — to third-party servers. Under the EU AI Act, that's a compliance liability.

The Risk

PII in prompts means your users' personal data is processed by third-party LLM providers — often without consent or safeguards.

The Deadline

December 2, 2027 — EU AI Act record-keeping obligations (Articles 12 & 19) take effect for high-risk (Annex III) AI systems.

The Penalty

Non-compliance fines up to 7% of global revenue or 35 million, whichever is higher.

New · Technical Whitepaper · April 2026

The Article 12 Paradox

Why GDPR and the EU AI Act cannot both be satisfied without PII middleware.

The EU AI Act requires logging every high-risk AI interaction. GDPR prohibits retaining personal data. This whitepaper explains the structural conflict and the architectural middleware layer that resolves it — with no legal trade-offs.

  • Article 12 logging vs. GDPR data minimisation — a structural, unavoidable conflict
  • Deterministic tokenization as GDPR-recognised pseudonymisation (Recital 26, Art. 4(5))
  • Behavioral traceability vs. identity traceability — what regulators actually require
  • Article 4a readiness: pseudonymised special-category data for bias detection
[CloakLLM] Whitepaper
Volume 1
The Article 12 Paradox
Why GDPR and the EU AI Act cannot both be satisfied without PII middleware.
April 2026v1.0

Frequently asked questions

What does CloakLLM do?+

CloakLLM is open-source middleware that detects personal data (PII) in your LLM prompts and replaces it with reversible tokens before the prompt leaves your infrastructure — while keeping tamper-evident audit logs that contain no original PII.

Does CloakLLM send my data to your servers?+

No. CloakLLM is self-hosted and runs entirely inside your own infrastructure. It is MIT-licensed open source; no prompt content or personal data is ever sent to CloakLLM.

How does CloakLLM help with the EU AI Act?+

The EU AI Act (Articles 12 and 19) requires keeping logs of high-risk AI interactions, while GDPR requires not retaining personal data. CloakLLM strips the PII before it reaches any log, so you can keep an inspectable audit trail that contains no personal data — the record-keeping/evidence slice of Articles 12, 19, 4a and 50.

How accurate is the PII detection?+

On a deliberately hard benchmark of messy, real-world formats, CloakLLM's default detector scrubs about 94% of the sensitive characters — and 100% of the common contiguous formats like emails, SSNs and single-string cards. Coverage should always be verified on your own data; the tool helps you achieve compliance, it is not itself a compliance guarantee.

What happens to my audit evidence if CloakLLM disappears?+

It still verifies. The logs are MIT-licensed and self-hosted, and they check out with standard tools — the RFC 3161 timestamps verify with OpenSSL — whether or not CloakLLM exists. A standalone verifier lets your auditor confirm the hash chain, timestamps, and reports without CloakLLM's SDK or code.

Which languages and locales are supported?+

Detection ships with 13 locales alongside the core regex and NER patterns, and an opt-in local LLM pass can catch context-dependent PII that regex misses.

Using CloakLLM? Preparing for a 2027 audit?

We're talking to teams deploying AI under the EU AI Act — what you're building, what an audit will ask of you, and what's missing. Auditors and certification bodies especially welcome.

Talk to us