Head to head · PII detection · October 2026 research run

LlamaFirewall vs Presidio

Presidio scores 68.6 (B) on agent readiness against LlamaFirewall's 53.2 (D), and leads in 6 of 7 scored categories. Both do pii detection.

Best guardrails and safety filters for AI agents · All 175 guardrails comparisons

Which one, for what

LlamaFirewall D

Best for A Python agent team that wants injection, hidden-character and generated-code checks in process, is willing to pin dependencies or install from main, and can get the gated weights.

Also in its favour

  • No incidents deducted, where Presidio loses 3 points for them

Watch for

No release found after 1.0.3 of May 2025, and no changelog, tags or deprecation notes were found

Presidio B

Best for Detecting and masking personal data in prompts, outputs, logs and images on the owner's own machines, with detection tuned by entity, threshold and custom recognisers.

Ahead on

  • Reliability, 78 against 48
  • Schema & documentation, 71 against 49
  • Agent ergonomics, 69 against 60
  • Payments & pricing, 90 against 75
  • Maintenance & community, 78 against 15
  • Transparency & trust, 67 against 62

Watch for

The REST containers have no authentication by design. The FAQ says to put a gateway or proxy in front

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Maintenance & community Presidio +63

LlamaFirewall 15

The newest version is 1.0.3, set in pyproject.toml on 28 May 2025 per a clone of main on 4 November, which holds no tags. The 8 October PyPI upload dates came from PyPI's JSON interface and are struck, and pypi.org did not resolve on 4 November, so no newer release was found (0 of 30). No release in the 90 days from 6 August 2026 (0 of 20). LlamaFirewall issues from June and July 2025 had no reply on 8 October, and outside pull requests from August and September 2025 were still open, with pull request 185 unmerged after nearly seven months. Not re-read on 4 November. Four commits touched the folder in the 90 days from 6 August, all type-check and lint housekeeping by Meta's automated accounts, the newest on 30 October 2026 (6 of 25). The package is on PyPI but does not match current huggingface_hub and transformers (5 of 15). Workflows run the tests, lint and the docs site deployment on every push to main, and their results could not be read on 4 November, so the 8 October reading of 29 September (tests passed, lint and deployment failed) is not re-read. Dependencies carry lower bounds only, and the released Prompt Guard loader does not import with current huggingface_hub. The line is partly met, so the earlier partial value is kept and flagged (4 of 10). 0+0+6+5+4 = 15.

Presidio 78

2.2.366 was released on 27 October 2026, five days before the check, per the tag in a clone and the PyPI page (30). Two releases since 3 August, 2.2.365 on 25 October and 2.2.366 on 27 October, each with analyser, anonymiser and image redactor changes. Half the line for two, as earlier dossiers read it (10 of 20). Main had 14 commits from 8 October to 1 November, many merged from outside contributors. Issue reply times are per the 8 October check, not re-read on 1 November (GitHub's API answers 403 here) (15 of 25). Current packages on PyPI for the analyser, anonymiser, image redactor, structured module and CLI (15). Dependabot, committed uv lockfiles refreshed in 2.2.366 and CI on each package, with the run state per the 8 October check, not re-read on 1 November (8 of 10). 30+10+15+15+8 = 78.

Reliability Presidio +30

LlamaFirewall 48

Scored on the local-software lines, since the owner runs the library. It installs from PyPI as llamafirewall, and the README states Python 3.10 or later, but the package metadata carries no Python requirement and every dependency has a lower bound only. The 1.0.3 wheel imports HfFolder from huggingface_hub, which 2.2.0 no longer exports, so by our reading of the source a fresh install cannot load the Prompt Guard scanner without older pins. Main replaced that import in the loader on 26 March 2026, in no release. We did not run it (10 of 20). A public tests workflow runs the LlamaFirewall unit tests on Python 3.10 and 3.12 on every push to main. Its result on main could not be read on 4 November, since GitHub's pages and API answered 403, so the settled value for CI that runs the tests with an unreadable result applies (15 of 25). Issues 114, 116 and 117 from June and July 2025 and issue 219 from April 2026 had no reply on 8 October, and pull request 185, which fixes the import error, had been open since 13 March 2026. Not re-read on 4 November (8 of 25). Version numbers follow semver in form, but there is no changelog, and a clone of main on 4 November held no tags (3 of 15). Version 1.0.3, with two of six scanners under scanners/experimental (12 of 15). 10+15+8+3+12 = 48.

Presidio 78

Local-software reading. Installs from PyPI as presidio-analyzer and presidio-anonymizer. Since 2.2.366 (27 October 2026) the packages require Python 3.11 to 3.14, per the PyPI page and the package metadata (20). Public CI on GitHub Actions tests each package on several Python versions, and 2.2.366 added e2e runs against the distroless images. Per the 8 October check, not re-read on 1 November (GitHub's API answers 403 here), six of eight runs on main passed and the 8 October run failed (20 of 25). Per the 8 October check, not re-read on 1 November, 68 open issues, two labelled bug, 98 open pull requests and most issues opened since 20 September without a reply (15 of 25). Every release counts up as 2.2.x, and 2.2.366 renames the hf_token_pipe spaCy factory in a patch number. CHANGELOG.md now has sections for 2.2.364, 2.2.365 and 2.2.366 and calls out the rename (8 of 15). Version 2.2.366, past 1.0, though the image redactor package is 0.0.62 (15). 20+20+15+8+15 = 78.

Schema & documentation Presidio +22

LlamaFirewall 49

Framework reading. There is no API reference page and no specification. The contract is the typed source, with dataclasses and enums for messages, roles, scanner types, decisions and status (12 of 25). No llms.txt on the docs site (404 again on 4 November). The docs are Markdown in the repository (5 of 10). Each scanner has a page that states its purpose and the risks it covers. None says when not to use it or what it misses (12 of 20). Roles, scanner types and decisions are enums. tool_calls is a free-form list of dictionaries, and scanner options such as the block threshold or the judge model cannot be set through the configuration mapping (10 of 15). Eleven example scripts, a notebook and five tutorials. The custom scanner guide names a BaseScanner class that is not in the source, the README's sample output does not match the fields the code returns, its examples link answers 404, and errors are not documented (7 of 15). PyPI version numbers only, with no changelog (3 of 15). 12+5+12+10+7+3 = 49.

Presidio 71

API reading for the REST services. An OpenAPI 3.0 document of 792 lines covers eight paths of the analyser and anonymiser. The image redactor's /redact is not in it (22 of 25). presidio.dataprivacystack.org/llms.txt returns 404 on 1 November 2026 (0). Operations carry a one-line summary and description, and the docs explain each module, without guidance on when not to use a call (14 of 20). Request schemas are typed, with one enum in the document, and anonymiser operator parameters are objects keyed by entity type (10 of 15). Request and response examples are given, with 400 and 422 shapes for the anonymiser. The analyser's 500 on missing text is not in the document (11 of 15). Tagged releases and a public changelog with a dated section for every release since 2.2.364, which the 8 October check found missing. The document's own version still reads 2.0 (14 of 15). 22+0+14+10+11+14 = 71.

Payments & pricing Presidio +15

LlamaFirewall 75

Self-hosted rule, with one departure. MIT-licensed, with nothing to buy from Meta (20). Free to run with no card (20). The rule would give 20 for use without sign-up, and the regex, hidden ASCII and CodeShield scanners do run with no account. The default scanner for user and tool messages needs weights that sit behind a form reviewed by hand, so an agent cannot get full access alone (10 of 20). No payment protocol (0). Together AI charges for the two scanners that call it. 20+20+10+0 = 50. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 50 is 75.

Presidio 90

MIT-licensed package the owner runs, with no hosted or paid option from the project, read with the self-hosted rule. 20 for pricing, 20 for a free start and 20 for use without an account or key. No x402, MPP or L402 in the docs or source (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.

Agent ergonomics Presidio +9

LlamaFirewall 60

Read as a classifier an agent calls in process. A result is four fields, though a Prompt Guard block quotes the whole scanned text in reason and CodeShield lists every finding (21 of 25). Scanners are chosen per role and two preset use cases exist. Prompt Guard input is cut at 512 tokens with no chunking, which the model card leaves to the caller (10 of 20). A status field and a clear message for a missing key exist. AlignmentCheck returns human review when its model call fails, and allow with status error when no trace is given. scan() wraps asyncio.run and fails inside a running loop (issue 116), scan_async returns a fixed score of 0.0 on allow, and none of this is documented (8 of 20). Scans are stateless and the local scanners are deterministic, with temperature 0 for the hosted judge. Each scan builds a new scanner, which reloads the model from disk (14 of 20). Working defaults with no arguments, Python only, and an interactive login prompt when no Hugging Face token is present (7 of 15). 21+10+8+14+7 = 60.

Presidio 69

/analyze takes an entity list, a score threshold and an allow list, and leaves the decision trace off unless return_decision_process is set, so responses can be kept small (20 of 25). Text can be a string or an array for batches. There is no pagination, and none is needed for span lists (14 of 20). Errors are JSON with an error field and a 400, 422 or 500 status, but the analyser answers 500 for a missing text or language, and open issue 2256 reports that an unsupported entity is dropped without an error (10 of 20). Calls are stateless and safe to retry. Results from model-based recognisers depend on the loaded model (16 of 20). Two required fields and working defaults, with a Python library only (9 of 15).

Transparency & trust Presidio +5

LlamaFirewall 62

The library is MIT. The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence, which is not an OSI licence, and the repository root carries a third licence file (26 of 30). Four scanners keep text on the owner's machine. AlignmentCheck and the PII scanner post the conversation to Together AI by default. The setup guide mentions the key, and no page says what is sent or how it is handled (15 of 30). No deprecation policy, changelog or dated notices found (0 of 20). No telemetry code found in the library source on 4 November, and the docs make no statement either way (15 of 20). 26+15+0+15 = 56.

Presidio 67

MIT licence, with the copyright line changed from Microsoft Corporation to Presidio Contributors in July 2026 (30). The software runs on the owner's machines and there is no hosted service, so there is no privacy policy or retention statement to read. The docs say which optional recognisers call outside services (Azure AI Language, Azure Health Data Services, LangExtract with a hosted or Ollama model) (20 of 30). Deprecations appear in the changelog and as banners on old config files, and the move of images from Microsoft's registry to GHCR is announced, but no dates are given and the kr alias removal is marked release TBD (10 of 20). We found no telemetry code in the repository and no statement on telemetry in the docs (16 of 20).

Score by category

CategoryWeightLlamaFirewallPresidioEdge
Reliability16%4878Presidio +30
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%4971Presidio +22
Agent ergonomics13%6069Presidio +9
Security & auth14%5653LlamaFirewall +3
Payments & pricing10%7590Presidio +15
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%1578Presidio +63
Transparency & trust7%6267Presidio +5
Negative events≤150-3
TotalD 53.2/100B 68.6/100

Facts side by side

FactLlamaFirewallPresidio
KindAgent frameworkSDK + MCP
VendorMetaData Privacy Stack
Hosted endpointno (local only)no (local only)
TransportsHTTP
AuthNoneNone
PricingFreeFree
x402nono
LicenceMIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community LicenceMIT
Read-only variant documentednono
llms.txtnono
Last release2025-05-292026-10-27
Terms last updatedno document linkedno document linked
Privacy policy last updatedno document linkedno document linked
Popularity4.4k stars11k stars, 1.2M PyPI/wk
Agent reviewsnone3.3/5 (4)

How the scores have moved

Verdicts

LlamaFirewall

One scan() call runs several checks on the owner's machine and returns a short typed result. The newest version, 1.0.3, dates from May 2025, and its Prompt Guard loader imports a huggingface_hub class that current versions no longer export, so a fresh install needs older pins. The classifier weights also need Meta's manual approval.

Presidio

MIT-licensed personal data detector with a public OpenAPI document, two releases in late October 2026 and about 1.2 million weekly PyPI downloads. The REST containers have no authentication, 2.2.365 fixed two bugs that left flagged text unredacted, with no advisory, and it covers personal data only, with no prompt injection checks.

Before you call either

LlamaFirewall

  1. Pin huggingface_hub below 1.0 and a matching transformers 4.x before importing the Prompt Guard scanner from the 1.0.3 wheel, or install from main
  2. Get access to meta-llama/Llama-Prompt-Guard-2-86M and set a Hugging Face token first. Without one the loader prompts for a login and a headless run stalls
  3. Call scan_async inside a running event loop. scan() wraps asyncio.run and fails there. scan_async returns score 0.0 and reason default on every allow
  4. Split text longer than 512 tokens yourself before a Prompt Guard scan. The library truncates and does not chunk
  5. Do not feed a block reason back to the model. The Prompt Guard reason quotes the full scanned text, and the hidden ASCII reason decodes the hidden payload

Presidio

  1. Install from PyPI or pull images from ghcr.io/data-privacy-stack. The mcr.microsoft.com/presidio-* images are no longer updated
  2. Use Python 3.11 to 3.14. Since 2.2.366 a Python 3.10 environment resolves to older releases
  3. Download a spaCy model (python -m spacy download en_core_web_lg) before the first AnalyzerEngine() call, or use the Docker image
  4. Send both text and language to /analyze. A request missing either returns HTTP 500 with a JSON error field
  5. Pass entities and score_threshold to limit results. Many country-specific recognisers are disabled by default and need enabling in the registry YAML
  6. Keep the containers on a private network or behind your own authenticating proxy. They accept any caller
  7. Rebuild any spaCy pipeline saved with hf_token_pipe before upgrading to 2.2.366, which registers presidio_hf_token_pipe instead

Questions

Which is better for AI agents, LlamaFirewall or Presidio?

Presidio scores 68.6 (B) on agent readiness against LlamaFirewall's 53.2 (D), and leads in 6 of 7 scored categories.

Are LlamaFirewall and Presidio open source?

Yes. LlamaFirewall is open source (MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence). Presidio is open source (MIT).

Other comparisons with LlamaFirewall or Presidio

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.