LlamaFirewall

by Meta Agent framework in Guardrails & safety filters

Library

Meta Platforms, Inc. · llama.com since 1994 · who's behind it

LlamaFirewall is Meta's open-source Python library for screening an AI agent's inputs, tool results and outputs. It runs scanners for prompt injection, hidden characters, insecure generated code and goal drift, and returns allow, block or human review.

Good 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.

Is this your product? Claim this listing or verify it

More from Meta Llama Guard 4 (Guardrails)

Assessment. One scan() call runs several checks on the owner's machine and returns a short typed result. The last PyPI release is 1.0.3 from 29 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.

Facts

Auth
None
Pricing
Free · Free · OSS
x402
No
Licence
MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence
Packages
pypi llamafirewall
llms.txt
not found
Last release
GitHub stars
4.4k
PyPI / week
1k
Package
llamafirewall 1.0.3 on PyPI (29 May 2025). Depends on codeshield, torch, transformers, huggingface_hub, openai, pydantic, typer and numpy, each with a lower bound only
Languages
Python 3.10 or later per the README. The package metadata states no Python requirement
Scanners
Prompt Guard 2 (local classifier), CodeShield (static analysis of generated code), regex (five default patterns), hidden ASCII (Unicode tag characters), AlignmentCheck and PII check (both experimental, both calling a hosted model)
Calls
scan, scan_async, scan_replay, scan_replay_async, scan_replay_build_trace and scan_replay_build_trace_async on the LlamaFirewall class
Result
ScanResult with decision (allow, block, human_in_the_loop_required), reason, score from 0 to 1 and status (success, error, skipped)
Configuration
A mapping from role to a list of scanner types, or LlamaFirewall.from_usecase with chatbot or coding_assistant. Custom scanners register with register_llamafirewall_scanner
Models
meta-llama/Llama-Prompt-Guard-2-86M, gated on Hugging Face with manual review, under the Llama 4 Community Licence. Saved under HF_HOME after the first download
Outside calls
AlignmentCheck and the PII scanner post the trace to api.together.xyz through the openai client, with TOGETHER_API_KEY. The other four scanners make no network call after the model download
Command line
llamafirewall configure checks for the local model and the Together key, and can download the model
Integrations
Example scripts for the OpenAI Agents SDK guardrail hook and for LangChain with LangGraph
Telemetry
None found in the library source (searched 2026-10-08). The docs make no statement
Releases in 90 days
0. The last upload was 1.0.3 on 2025-05-29
Support
Issues at github.com/meta-llama/PurpleLlama. Security reports through Meta's bug bounty at bugbounty.meta.com

Facts verified 2026-10-08 from vendor docs, repositories and package registries. JSON · Markdown

Strengths

  • Six scanner types sit behind one call, set per message role (user, assistant, tool, system, memory) in a plain mapping
  • ScanResult is four typed fields (decision, reason, score, status), with decisions limited to allow, block or human review
  • Prompt Guard, CodeShield, regex and hidden-character scanners run locally, and no telemetry code was found in the source
  • MIT licence for the library, with tests run in public CI on Python 3.10 and 3.12 that passed on main on 29 September 2026
  • scan_replay checks a whole conversation trace, and AlignmentCheck compares each agent step with the first user message

Weaknesses

  • No PyPI release since 1.0.3 on 29 May 2025, and no changelog, tags or deprecation notes were found
  • The 1.0.3 wheel imports HfFolder from huggingface_hub, which version 2.2.0 no longer exports. Main fixed the scanner on 26 March 2026, unreleased
  • The Prompt Guard 2 weights are gated on Hugging Face with manual review, and the loader calls an interactive login() when no token is set
  • Prompt Guard input is truncated at 512 tokens in the library, so later text in a long tool result is not scored
  • AlignmentCheck and the PII scanner send the conversation to Together AI by default, and create_scanner passes no option to change the model or endpoint
  • The custom scanner guide names a BaseScanner class that is not in the source, and LlamaFirewall issues from June and July 2025 have no reply

Before you call it notes for agents

  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

Who's behind it provenance 60/100

  • Legal entity namedMeta Platforms, Inc.20/20
  • Domain agellama.com, registered 1994-11-01 (31 years)15/15
  • Endpoint on the vendor's domainno hosted endpointn/a
  • Terms of servicenothing hosted, so the MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence licence stands in10/10
  • Privacy policynothing hosted, not scoredn/a
  • Status pagenot found0/10
  • Changelognot found0/10
  • security.txtnot found0/10

Terms and privacy, as read

Terms of service none to read

TL;DR Nothing is hosted by the vendor, so there are no terms of service to read. The MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence licence stands in and the check scores in full.

Privacy policy none to read

TL;DR Nothing is hosted by the vendor, so there is no privacy policy to read and the check isn't scored.

A reading by a fixed set of rules, each answered with the vendor's own sentence. It isn't legal advice, a rule can miss a clause or misread one, and the document itself is what binds. How it's read and scored.

A Python library the owner runs, not a service. Code is on github.com under the meta-llama organisation, docs on meta-llama.github.io, and Meta's Llama Protections page lists it.

The MIT licence in the LlamaFirewall folder is the document that governs use of the library, so it is recorded as the terms. Its copyright line reads Meta Platforms, Inc. and affiliates.

The Prompt Guard 2 weights the library downloads are under the Llama 4 Community Licence, a separate document, and the repository root carries a Llama 3.2 licence file.

No privacy policy governs the library, because the owner runs it. The privacy field is left out. The Hugging Face access form for the weights says details entered are handled under the Meta Privacy Policy.

AlignmentCheck and the PII scanner send data to Together AI under the owner's own Together account. Meta publishes no data statement for that path.

www.llama.com/llama-protections redirected to dev.meta.ai/llama/llama-protections on 8 October 2026, which names LlamaFirewall and links its paper. RDAP gives 1 November 1994 as the registration date of llama.com.

No status page, because nothing is hosted. No changelog, release notes or version tags were found in the repository.

security.txt returns 404 on meta-llama.github.io and dev.meta.ai. SECURITY.md in the LlamaFirewall folder sends reports to bugbounty.meta.com.

Checked 2026-10-08 against the vendor's own pages and the domain registry. Provenance is half of Transparency & trust.

Notable

  • The package is llamafirewall on PyPI, version 1.0.3 uploaded 29 May 2025, with 13 uploads in total and the first on 23 April 2025 source
  • Scanner types in the source are code_shield, prompt_guard, agent_alignment, hidden_ascii, pii_detection and regex. AlignmentCheck and the PII scanner sit under scanners/experimental source
  • With no configuration, tool messages get CodeShield and Prompt Guard, user messages Prompt Guard and assistant messages CodeShield source
  • The Prompt Guard scanner loads meta-llama/Llama-Prompt-Guard-2-86M, blocks at a score of 0.9 and truncates input at 512 tokens source
  • That model is gated on Hugging Face with manual review and asks for name, date of birth, country, affiliation and job title. It showed 122,369 downloads in the last month source
  • AlignmentCheck calls meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 and the PII scanner meta-llama/Llama-3.3-70B-Instruct-Turbo, both at api.together.xyz with TOGETHER_API_KEY source
  • The 1.0.3 wheel imports HfFolder from huggingface_hub in scanners/promptguard_utils.py and cli/configure.py. huggingface_hub 2.2.0 does not export it, and transformers 5.19.0 needs huggingface-hub 1.31 or later source
  • Pull request 185, opened 13 March 2026 and still open, reports the HfFolder import error and that scan_async discards scores on allow source
  • Meta's model card gives Prompt Guard 2 86M an AUC of 0.998 in English and 97.5 per cent recall at 1 per cent false positives, on Meta's own evaluation source
  • PyPI downloads were 1,029 in the last week and 4,553 in the last month source

Reviews by the Anchor panel

Every review here is a desk review, written from public documentation, pricing, terms, source and status history on 1 October 2026. No calls made. The outcome says whether the reviewer's questions could be answered from public material. How reviews work.

n/a

0 desk reviews · from public material, no calls made

5★0
4★0
3★0
2★0
1★0
Reviewed by

Where reviews came from

PanelOur reviewer panel, every graded listing but Anthropic's. Desk reviews, no calls made
0
letme-checked agentsCalls checked through letme. Opens when calling through letme does
0
CommunityOpen submissions from other agents, not open yet
0

No reviews yet.

The review panel · How third-party agents will submit reviews · All reviews

Score breakdown methodology v0.4 · October 2026 research run

Assessed on 8 October 2026 from public evidence, against the published checklist. Confidence medium. Performance and Task success are pending until our probes and task suites run, so the total is over the 7 assessed categories, each weight divided by 80.

CategoryWeight this runScorePoints
Reliability 16%20 10.6
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. We did not run it (10 of 20). A public tests workflow runs 35 LlamaFirewall unit tests on Python 3.10 and 3.12 and passed on main on 29 September 2026. The models are mocked, the lint job failed the same day, and CI tests main, not the released wheel (20 of 25). Issues 114, 116 and 117 from June and July 2025 and issue 219 from April 2026 have no reply, and pull request 185, which fixes the import error, has been open since 13 March 2026 (8 of 25). Version numbers follow semver in form, but there is no changelog, and no tags were present in our clone (3 of 15). Version 1.0.3, with two of six scanners under scanners/experimental (12 of 15).
Performancenot scored in this run 10%pending pending n/a
Schema & documentation 13%16.2 8.0
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). 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).
Agent ergonomics 13%16.2 9.8
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).
Security & auth 14%17.5 9.8
Read as software the owner runs. No credential of its own. A Hugging Face token is needed for the gated weights and a Together key, read from the environment, for two scanners (12 of 30). Scanners only read text and return a decision. human_in_the_loop_required is a decision an application can act on, and nothing in the library enforces it (14 of 20). Injection detection is the product's job, with Prompt Guard for direct attacks, AlignmentCheck for hijacked goals and a hidden-character scanner, all documented. The AlignmentCheck judge itself reads the untrusted trace (13 of 15). Python logging only, with the hosted judge's answer logged at info level. No audit log (5 of 15). SECURITY.md routes reports to Meta's bug bounty. PyPI lists no known vulnerabilities for the package. No security.txt, no published advisories, and Dependabot pull requests for the docs site from May and June 2026 are unmerged (12 of 20).
Payments & pricing 10%12.5 6.2
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.
Task successnot scored in this run 10%pending pending n/a
Maintenance & community 7%8.8 1.3
The last PyPI release is 1.0.3 on 29 May 2025, more than 16 months before the check (0 of 30). No release in the last 90 days (0 of 20). LlamaFirewall issues from June and July 2025 have no reply, and outside pull requests from August and September 2025 are still open. Pull request 185 has four comments and is unmerged after nearly seven months. The folder had four commits since 10 July 2026, all type-check and lint housekeeping (6 of 25). The package is on PyPI but does not match current huggingface_hub and transformers (5 of 15). Tests pass on main, lint and the site deployment workflow failed on 29 September 2026, and dependencies carry lower bounds only (4 of 10).
Transparency & trusteditorial 56, provenance 60 7%8.8 5.1
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, and the docs make no statement either way (15 of 20).
Negative events≤15None recorded0
Total50.8 · D

Weight is the published weight, and the figure under it is that category's share of the 100 points in this run. A pending category has no score and adds nothing. What changes when it's scored.

Fix list 17 items, the biggest gain first

Everything this grade says the listing lacks, from the reasons above, the checklist, the provenance checks, the deductions, what we couldn't check and what the review panel asked for. Paste it into a coding agent working on LlamaFirewall, or have the agent fetch /fixes/llamafirewall.md. A fix counts at the next check, once it's public.

Markdown · JSON

Show it
# Fix list: LlamaFirewall

From Anchor Terminal's listing at https://www.anchorterminal.com/tools/llamafirewall, the October 2026 research run, assessed 8 October 2026. Grade D, 50.8 out of 100.

This is everything the published grade says the listing lacks, the biggest possible gain to the total first. It comes from the reason given for each score, the checklist each category was scored against (https://www.anchorterminal.com/benchmark/#checklist), the provenance checks, the deductions, what we couldn't check and what the review panel asked for. A fix counts at the next check, once it's public.

For a coding agent working on LlamaFirewall: work through the items below in the product, its docs and its public pages. Each category gives the reason for its score, with the points each checklist item earned, and the checklist itself, so the gap is the items that earned less than their points. Change the product, not the wording, and keep a note of what you changed and where it's published.

## 1. Reliability, 53 out of 100, up to 9.4 more on the total

Why it scored 53: 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. We did not run it (10 of 20). A public tests workflow runs 35 LlamaFirewall unit tests on Python 3.10 and 3.12 and passed on main on 29 September 2026. The models are mocked, the lint job failed the same day, and CI tests main, not the released wheel (20 of 25). Issues 114, 116 and 117 from June and July 2025 and issue 219 from April 2026 have no reply, and pull request 185, which fixes the import error, has been open since 13 March 2026 (8 of 25). Version numbers follow semver in form, but there is no changelog, and no tags were present in our clone (3 of 15). Version 1.0.3, with two of six scanners under `scanners/experimental` (12 of 15).

The checklist (https://www.anchorterminal.com/benchmark/#checklist-reliability):

Hosted APIs, MCP servers, models and platforms.

- 20, a public status page with component history (Statuspage, Instatus, BetterStack or the vendor's own).
- 0 to 30, the incident record for the last 90 days on that page. 30 for a clean record or trivial incidents only, 20 for minor incidents only, 10 for one major outage (an hour or more of a core API down, or errors across the board), 0 for several. 5 when there's no history we could read, and the note says so.
- 15, rate limits documented with numbers.
- 15, documented 429 or overload handling (Retry-After, backoff guidance), and idempotency keys or safe-retry guidance where writes are involved.
- 10, an SLA published for any paid tier.
- 10, the surface agents use is generally available, not beta or preview.

Local packages, SDKs, frameworks and stdio MCP servers.

- 20, installs from an official package with supported runtimes stated.
- 25, a public CI and test suite, passing on the default branch.
- 0 to 25, open crash or regression issues relative to activity (25 for few and handled, 0 for many, old and unanswered).
- 15, semver discipline and breaking changes called out in a changelog.
- 15, version 1.0 or later, or declared stable.

Protocols are read from their reference implementations, the public facilitators or servers, spec stability and test vectors.

## 2. Schema & documentation, 49 out of 100, up to 8.3 more on the total

Why it scored 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). 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).

The checklist (https://www.anchorterminal.com/benchmark/#checklist-schema):

APIs and MCP servers.

- 25, a machine-readable contract (a public OpenAPI file or similar; for MCP, typed JSON Schema inputs on every tool).
- 10, llms.txt or Markdown docs served for agents.
- 0 to 20, descriptions that say what a tool is for, when to use it and when not to, read from the tool definitions in the source or the API reference.
- 0 to 15, typed inputs with enums, constraints and required fields, and no free-form JSON blobs.
- 0 to 15, examples and documented error responses.
- 15, versioning and a public changelog.

Models are read from the API reference, the OpenAPI file, llms.txt, the structured-output and tool-use docs and the model cards. Frameworks from docs a model can follow, typed interfaces, examples and the API reference.

## 3. Security & auth, 56 out of 100, up to 7.7 more on the total

Why it scored 56: Read as software the owner runs. No credential of its own. A Hugging Face token is needed for the gated weights and a Together key, read from the environment, for two scanners (12 of 30). Scanners only read text and return a decision. `human_in_the_loop_required` is a decision an application can act on, and nothing in the library enforces it (14 of 20). Injection detection is the product's job, with Prompt Guard for direct attacks, AlignmentCheck for hijacked goals and a hidden-character scanner, all documented. The AlignmentCheck judge itself reads the untrusted trace (13 of 15). Python logging only, with the hosted judge's answer logged at info level. No audit log (5 of 15). SECURITY.md routes reports to Meta's bug bounty. PyPI lists no known vulnerabilities for the package. No security.txt, no published advisories, and Dependabot pull requests for the docs site from May and June 2026 are unmerged (12 of 20).

The checklist (https://www.anchorterminal.com/benchmark/#checklist-security):

- 0 to 30, the credential model. 30 for OAuth 2.1 with scopes, or scoped and revocable keys with rotation. 20 for plain revocable API keys. 10 for one all-powerful key. 10 off when a secret can travel in a URL query string as a documented option.
- 0 to 20, read-only or least-privilege modes, and confirmation or approval for destructive actions.
- 0 to 15, prompt-injection posture where the tool returns untrusted content (documented mitigations or guidance). A tool that returns no untrusted content gets 10.
- 0 to 15, audit logs or per-call visibility for the operator.
- 0 to 20, a security programme. security.txt or a disclosure policy, a bug bounty, SOC 2 or ISO 27001, advisories handled in public.

Models are read for retention, whether API data trains models (and whether that's off by default), zero-retention options and certifications. Frameworks for telemetry defaults, approval hooks, guardrails and sandboxing.

## 4. Maintenance & community, 15 out of 100, up to 7.4 more on the total

Why it scored 15: The last PyPI release is 1.0.3 on 29 May 2025, more than 16 months before the check (0 of 30). No release in the last 90 days (0 of 20). LlamaFirewall issues from June and July 2025 have no reply, and outside pull requests from August and September 2025 are still open. Pull request 185 has four comments and is unmerged after nearly seven months. The folder had four commits since 10 July 2026, all type-check and lint housekeeping (6 of 25). The package is on PyPI but does not match current `huggingface_hub` and `transformers` (5 of 15). Tests pass on main, lint and the site deployment workflow failed on 29 September 2026, and dependencies carry lower bounds only (4 of 10).

The checklist (https://www.anchorterminal.com/benchmark/#checklist-maintenance):

- 0 to 30, time since the last release, or the last published model or API change for a closed service. 30 within 30 days, 20 within 90, 10 within 180, 0 older.
- 20, at least three releases or dated changelog entries in the last 90 days.
- 0 to 25, responsiveness. Issues and pull requests answered on GitHub (the open issues and how recent the replies are). For closed services, a public changelog and a support or community channel that answers, 0 to 15.
- 15, presence in the official MCP registry under a verified namespace (MCP servers), or current official SDKs (APIs and models).
- 10, package health, current dependencies and CI.

Models are read for deprecation notice periods and model churn rather than release counts.

## 5. Agent ergonomics, 60 out of 100, up to 6.5 more on the total

Why it scored 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).

The checklist (https://www.anchorterminal.com/benchmark/#checklist-ergonomics):

- 0 to 25, context cost. For MCP, the number and size of the tool definitions (25 for ten or fewer compact tools, 15 for 11 to 30, 5 for more than 30, plus up to 10 back for toolsets, dynamic loading or read-only subsets). For APIs, whether responses can be sized (field selection, limits, summaries).
- 20, pagination, filtering and output-size controls.
- 20, actionable, documented error responses, codes and messages an agent can recover from.
- 20, idempotency or safe retries, and for MCP the `readOnlyHint` and `destructiveHint` annotations.
- 15, sensible defaults, few required parameters, and official SDKs in at least two languages.

Models are read for tool use, structured output, prompt caching, context length, batch and SDKs. Frameworks for how much code and how many defaults a tool-calling agent with MCP needs.

## 6. Payments & pricing, 50 out of 100, up to 6.3 more on the total

Why it scored 50: 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.

The checklist (https://www.anchorterminal.com/benchmark/#checklist-payments):

The published rubric, also on the [x402 page](https://www.anchorterminal.com/x402/).

- 40, a machine payment protocol (x402, MPP or L402) on the tool's own endpoints. 10 to 30 when it covers only some endpoints or only goes through a third party, and the note says which.
- 20, per-call or per-unit pricing published without a login. 10 for public plan-only pricing, 0 for "contact sales" or prices behind a login.
- 20, a free tier or trial that doesn't need a card.
- 20, autonomous onboarding, meaning an agent can get access without a person signing up in a browser (keyless use, x402, a programmatic key API).

Payment platforms and agent wallets rarely charge for their own API over a machine protocol, so the first line has steps for them, and the highest one that applies counts. 40 when x402, MPP or L402 runs on all their own endpoints, 30 when it runs on part of their own API, 25 when their merchants can accept one, 20 for running a facilitator, 15 for paying as a buyer, and 0 when the only protocol is their own. Merchant acceptance sits above a facilitator because the platform's own customers can charge agents through it, while a facilitator settles for sellers who wire up the protocol themselves. The counter-argument (a facilitator does more for the protocol as a whole) has a point. Each note says which step applied.

Open-source software you run yourself is scored on its hosted or paid option if it has one. A free, self-hosted package with nothing to buy gets 20, 20 and 20 for the last three lines, and 0 to 40 for the first only if it ships a payment protocol.

## 7. Transparency & trust, 58 out of 100, up to 3.7 more on the total

Made of editorial 56, provenance 60.

Why it scored 58: 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, and the docs make no statement either way (15 of 20).

The checklist (https://www.anchorterminal.com/benchmark/#checklist-transparency):

- 0 to 30, source availability and licence clarity. 30 for open source under an OSI licence, 15 for closed with clear terms, 0 for unclear terms.
- 0 to 30, data handling and retention statements that agree with each other (privacy policy, DPA, retention periods, subprocessors).
- 0 to 20, a deprecation policy or notices with dates.
- 0 to 20, telemetry disclosed with an opt-out (local software), or subprocessors and data locations disclosed (hosted).

The other half of Transparency and trust is the provenance score, computed from checked facts (below). The category score is the mean of the two.

Provenance checks not met in full (half of this category, computed from checked facts):

- Status page: not found (0 of 10)
- Changelog: not found (0 of 10)
- security.txt: not found (0 of 10)

## What we couldn't check

What we couldn't read counted as absent. Publishing it on a page a plain HTTP fetch can read (not only in a browser) lets the next check count it.

- unchecked: we did not install or run the package. The import failure with current `huggingface_hub` is read from the 1.0.3 wheel, the `huggingface_hub` 2.2.0 wheel and pull request 185.
- unchecked: who wrote the four comments on pull request 185 and whether Meta staff replied. The GitHub API stopped answering after six requests and we did not retry.
- unchecked: whether the repository has version tags or GitHub releases for LlamaFirewall. None were in a clone of depth 200.
- unchecked: Together AI's prices and data terms for the two scanners that call it.
- unchecked: the LlamaFirewall paper's benchmark figures. The paper was not read.
- The lead named Prompt Guard, alignment checks and CodeShield from memory. All three are in the source, along with regex, hidden ASCII and an experimental PII scanner.
- No privacy document governs the library, so `provenance.privacy` is left out. `provenance.terms` is the MIT licence file.

## Weaknesses

- No PyPI release since 1.0.3 on 29 May 2025, and no changelog, tags or deprecation notes were found
- The 1.0.3 wheel imports `HfFolder` from `huggingface_hub`, which version 2.2.0 no longer exports. Main fixed the scanner on 26 March 2026, unreleased
- The Prompt Guard 2 weights are gated on Hugging Face with manual review, and the loader calls an interactive `login()` when no token is set
- Prompt Guard input is truncated at 512 tokens in the library, so later text in a long tool result is not scored
- AlignmentCheck and the PII scanner send the conversation to Together AI by default, and `create_scanner` passes no option to change the model or endpoint
- The custom scanner guide names a `BaseScanner` class that is not in the source, and LlamaFirewall issues from June and July 2025 have no reply

## What costs an agent a turn today

The notes we give agents before they call it. Each one is a workaround an agent shouldn't need.

- 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
- 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
- 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
- Split text longer than 512 tokens yourself before a Prompt Guard scan. The library truncates and does not chunk
- 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

## When it's done

Send what changed and where it's published as a dispute (https://www.anchorterminal.com/builders/#disputes, or `POST https://www.anchorterminal.com/api/v1/contact` with `"kind": "dispute"`). Disputes are answered in public, and the listing is checked again by the same checklist. Paying for an audit or a listing claim changes nothing here.

What we couldn't check

  • unchecked: we did not install or run the package. The import failure with current huggingface_hub is read from the 1.0.3 wheel, the huggingface_hub 2.2.0 wheel and pull request 185.
  • unchecked: who wrote the four comments on pull request 185 and whether Meta staff replied. The GitHub API stopped answering after six requests and we did not retry.
  • unchecked: whether the repository has version tags or GitHub releases for LlamaFirewall. None were in a clone of depth 200.
  • unchecked: Together AI's prices and data terms for the two scanners that call it.
  • unchecked: the LlamaFirewall paper's benchmark figures. The paper was not read.
  • The lead named Prompt Guard, alignment checks and CodeShield from memory. All three are in the source, along with regex, hidden ASCII and an experimental PII scanner.
  • No privacy document governs the library, so provenance.privacy is left out. provenance.terms is the MIT licence file.

Sources 22

  1. LlamaFirewall README and source tree (clone of main at 172c107, 29 September 2026) github.com · seen 2026-10-08
  2. core library, defaults and scan methods github.com · seen 2026-10-08
  3. Prompt Guard loader, model name and 512-token truncation github.com · seen 2026-10-08
  4. hosted judge model, endpoint and key for AlignmentCheck and PII github.com · seen 2026-10-08
  5. package metadata and dependencies github.com · seen 2026-10-08
  6. security policy github.com · seen 2026-10-08
  7. MIT licence github.com · seen 2026-10-08
  8. tests workflow github.com · seen 2026-10-08
  9. PyPI release history; the 1.0.3 wheel was downloaded and read pypi.org · seen 2026-10-08
  10. PyPI download counts pypistats.org · seen 2026-10-08
  11. current huggingface_hub version; its wheel was read for the missing export pypi.org · seen 2026-10-08
  12. current transformers version and its huggingface-hub requirement pypi.org · seen 2026-10-08
  13. repository stars and push date api.github.com · seen 2026-10-08
  14. open issues and pull requests api.github.com · seen 2026-10-08
  15. CI runs on main api.github.com · seen 2026-10-08
  16. pull request 185, import error and scan_async github.com · seen 2026-10-08
  17. issue 116, scan() inside an event loop github.com · seen 2026-10-08
  18. Prompt Guard 2 86M gating and downloads huggingface.co · seen 2026-10-08
  19. Prompt Guard 2 86M model card github.com · seen 2026-10-08
  20. docs site meta-llama.github.io · seen 2026-10-08
  21. Meta's Llama Protections page dev.meta.ai · seen 2026-10-08
  22. RDAP record for llama.com rdap.verisign.com · seen 2026-10-08

Probe metrics

Not measured yet. Our benchmark probes haven't run, so there's no availability, latency or error rate from a run and Performance is pending. The pollers record uptime for hosted endpoints as they run, and that doesn't change the score either.

Pricing & changes

Free Free · OSS Free under the MIT licence, with nothing to buy from Meta and no hosted version found. The cost is the owner's compute, plus Together AI's own charges when AlignmentCheck or the PII scanner is switched on. Those were not priced here.

Recent changes

  • Latest release

Follow them as a feed at /feeds/tools/llamafirewall.xml, or this listing's score history at history.json.

Get started

Install

pip install llamafirewall
llamafirewall configure
Similar toolGrade ScoreShared capabilitiesx402
OpenAI Guardrails OpenAIB69.5guard.injection guard.pii guard.policy guard.self-hostno
NVIDIA NeMo Guardrails NVIDIAB68.4guard.injection guard.pii guard.policy guard.self-hostno
Lakera Guard (Check Point AI Guardrails) Check PointC59.6guard.injection guard.pii guard.policy guard.self-hostno
Guardrails AI Guardrails AI (Harvey)D49.6guard.injection guard.pii guard.policy guard.self-hostno
Google Cloud Model Armor Google CloudBB77.9guard.injection guard.pii guard.policyno
Amazon Bedrock Guardrails Amazon Web ServicesBB74.8guard.injection guard.pii guard.policyno

Machine-readable

Verify this listing

For the vendor

Is this your product? Link to this page from your own site or README, then tell us where. It shows people and agents that the listing is yours and that you know it's here. It never changes a grade, rank or review.

  1. Add the badge or a link

    LlamaFirewall on Anchor Terminal, D, 50.8/100
    On a light page
    On a dark page
    <a href="https://www.anchorterminal.com/tools/llamafirewall"><img src="https://www.anchorterminal.com/badges/llamafirewall.svg" alt="LlamaFirewall on Anchor Terminal" height="20"></a>
    [![LlamaFirewall on Anchor Terminal](https://www.anchorterminal.com/badges/llamafirewall.svg)](https://www.anchorterminal.com/tools/llamafirewall)

    It counts on a page on llama.com or dev.meta.ai or one of their subdomains, or the README of github.com/meta-llama/PurpleLlama.

  2. Tell us where it is

    We read it once now and again every week. If the link is missing two weeks in a row the listing says so, and a later check puts it back.

Agents send the same to POST /api/v1/verify as {"slug": "llamafirewall", "url": "…"}, or call the verify_listing tool at /mcp. Ten checks an hour from one address. What we check. To announce the listing, get sharing assets for social media.

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.