Head to head · Guard policy · October 2026 research run
Llama Guard 4 vs LlamaFirewall
LlamaFirewall scores 50.8 (D) on agent readiness against Llama Guard 4's 49.1 (D), and leads in 4 of 7 scored categories. Llama Guard 4 leads on agent ergonomics and maintenance & community. Both do guard policy.
Which one, for what
Good for A team outside the EU with a GPU that wants content moderation of text and images on its own hardware, against a fixed 14-category policy it can edit in the prompt.
Ahead on
- Agent ergonomics, 67 against 60
- Maintenance & community, 28 against 15
Watch for
Weights last changed on 29 April 2025, with no changelog, version tags or stated deprecation policy
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.
Ahead on
- Reliability, 53 against 38
- Payments & pricing, 50 against 45
Also in its favour
- Open source
Watch for
No PyPI release since 1.0.3 on 29 May 2025, and no changelog, tags or deprecation notes were found
Score by category
| Category | Weight this run | Llama Guard 4 | LlamaFirewall | Edge |
|---|---|---|---|---|
| Reliability | 16%20 | 38 | 53 | LlamaFirewall +15 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13%16.2 | 52 | 49 | Llama Guard 4 +3 |
| Agent ergonomics | 13%16.2 | 67 | 60 | Llama Guard 4 +7 |
| Security & auth | 14%17.5 | 53 | 56 | LlamaFirewall +3 |
| Payments & pricing | 10%12.5 | 45 | 50 | LlamaFirewall +5 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7%8.8 | 28 | 15 | Llama Guard 4 +13 |
| Transparency & trust | 7%8.8 | 55 | 58 | LlamaFirewall +3 |
| Negative events | ≤15 | 0 | 0 | |
| Total | 49.1 · D | 50.8 · D |
Facts side by side
| Fact | Llama Guard 4 | LlamaFirewall |
|---|---|---|
| Kind | Model API | Agent framework |
| Vendor | Meta | Meta |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | HTTP | |
| Auth | None | None |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | Llama 4 Community Licence (source-available weights, not an OSI licence), with the Llama 4 acceptable use policy | MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence |
| Read-only variant documented | no | no |
| llms.txt | no | no |
| Last release | 2025-04-29 | 2025-05-29 |
| Terms last updated | 2025-04-05 | no document linked |
| Privacy policy last updated | no document linked | no document linked |
| Customer content may train models | not found in the text | |
| Terms restrict automated access | not found in the text | |
| Terms restrict benchmarking | not found in the text | |
| Terms or service can change without notice | not found in the text | |
| Arbitration or class-action waiver | not found in the text | |
| Popularity | 4.4k stars | 4.4k stars, 1k PyPI/wk |
Verdicts
Llama Guard 4
A single self-hosted model classifies text and multi-image prompts against 14 MLCommons-aligned hazard categories and answers in a few tokens. The weights have not changed since 29 April 2025, download access needs Meta's manual approval, and the licence withholds the grant from individuals and companies based in the European Union.
LlamaFirewall
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.
Before you call either
Llama Guard 4
- Request access on the Hugging Face page before anything else. Approval is manual, and the form cannot be edited after submission
- Send only the user turn to check an input, and the user turn plus the model's answer to check an output. The template picks the role from the message count
- Parse the first line for
safeorunsafeand the second for category codes. Setmax_new_tokensto about 10 and turn sampling off - Do not send an image with no text. Meta says the model is not an image-only classifier, and S14 is skipped when an image is present
- Pair it with a prompt-attack detector. The card says the model can itself be moved by adversarial or injected text
LlamaFirewall
- Pin
huggingface_hubbelow 1.0 and a matchingtransformers4.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-86Mand set a Hugging Face token first. Without one the loader prompts for a login and a headless run stalls - Call
scan_asyncinside a running event loop.scan()wrapsasyncio.runand fails there.scan_asyncreturns score 0.0 and reasondefaulton 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
reasonback to the model. The Prompt Guard reason quotes the full scanned text, and the hidden ASCII reason decodes the hidden payload
Questions
Which is better for AI agents, Llama Guard 4 or LlamaFirewall?
LlamaFirewall scores 50.8 (D) on agent readiness against Llama Guard 4's 49.1 (D), and leads in 4 of 7 scored categories. Llama Guard 4 leads on agent ergonomics and maintenance & community.
Can an agent call Llama Guard 4 and LlamaFirewall without installing anything?
No hosted endpoint is listed for Llama Guard 4. No hosted endpoint is listed for LlamaFirewall.
Are Llama Guard 4 and LlamaFirewall open source?
No open-source release is listed for Llama Guard 4. LlamaFirewall is open source (MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence).
Other comparisons with Llama Guard 4 or LlamaFirewall
- Amazon Bedrock Guardrails vs LlamaFirewall
- Azure AI Content Safety (Prompt Shields) vs LlamaFirewall
- Cisco AI Defense Inspection API vs LlamaFirewall
- Google Cloud Model Armor vs LlamaFirewall
- Granite Guardian vs LlamaFirewall
- Guardrails AI vs LlamaFirewall
- Lakera Guard (Check Point AI Guardrails) vs LlamaFirewall
- LlamaFirewall vs NVIDIA NeMo Guardrails
- LlamaFirewall vs OpenAI Guardrails
- LlamaFirewall vs Prisma AIRS AI Runtime Security API
- Amazon Bedrock Guardrails vs Llama Guard 4
- Azure AI Content Safety (Prompt Shields) vs Llama Guard 4
- Cisco AI Defense Inspection API vs Llama Guard 4
- Google Cloud Model Armor vs Llama Guard 4
- Granite Guardian vs Llama Guard 4
- Guardrails AI vs Llama Guard 4
- Lakera Guard (Check Point AI Guardrails) vs Llama Guard 4
- Llama Guard 4 vs Mistral Moderation API
- Llama Guard 4 vs NVIDIA NeMo Guardrails
- Llama Guard 4 vs OpenAI Guardrails
- Llama Guard 4 vs OpenAI Moderation API
- Llama Guard 4 vs Prisma AIRS AI Runtime Security API
- LlamaFirewall vs Presidio
- LlamaFirewall vs Mistral Moderation API
- Llama Guard 4 vs Presidio
Machine-readable
- This page as Markdown
/compare/llama-guard-vs-llamafirewall.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/llama-guard.json·/api/v1/tools/llamafirewall.json - From a terminal
anchor compare llama-guard llamafirewall(the CLI) - Over MCP
compare_tools {"a": "llama-guard", "b": "llamafirewall"}at/mcp, no key