Head to head · Prompt injection detection · October 2026 research run

Google Cloud Model Armor vs LlamaFirewall

Google Cloud Model Armor scores 74.4 (BB) on agent readiness against LlamaFirewall's 53.2 (D), and leads in 6 of 7 scored categories. LlamaFirewall leads on payments & pricing. Both do prompt injection detection.

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

Which one, for what

Google Cloud Model Armor BB

Best for Teams already on Google Cloud who want prompt and response screening with real PII detection, document and URL scanning, and audit logs, at the lowest paid rate in the category.

Ahead on

  • Reliability, 90 against 48
  • Schema & documentation, 78 against 49
  • Agent ergonomics, 75 against 60
  • Security & auth, 90 against 56
  • Maintenance & community, 85 against 15
  • Transparency & trust, 87 against 62

Also in its favour

  • Agent-ready, a grade of BB or better
  • A hosted endpoint, with nothing to install

Watch for

OAuth only, and a template must exist in the same location as the endpoint before the first call

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.

Ahead on

  • Payments & pricing, 75 against 30

Also in its favour

  • No key needed to call it
  • Open source
  • No incidents deducted, where Google Cloud Model Armor 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

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 Google Cloud Model Armor +70

Google Cloud Model Armor 85

Newest release note 29 October 2026, Model Armor in southamerica-east1 (São Paulo) (30). 14 dated release notes between 3 August and 29 October 2026, 23 since 8 June (20). Public release notes and Cloud Customer Care. The client libraries link a Google Issue Tracker component for Model Armor, which we couldn't read (12 of 15). Official client libraries for Python and Node.js on PyPI and npm (15). @google-cloud/modelarmor 0.11.0 was tagged on 21 October 2026 and google-cloud-modelarmor 0.7.4 on 29 October 2026, both from monorepos with CI, but both are 0.x and marked release_level preview, and npm and PyPI didn't resolve from our shell on 1 November (8 of 10).

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.

Payments & pricing LlamaFirewall +45

Google Cloud Model Armor 30

No x402, MPP or L402 (0). $0.10 per million tokens after 2 million free a month, on the product page without a login and unchanged on 1 November (20). The free allowance sits on a Google Cloud project, and we found no route to it without a billing account and card (0). A person creates the project, enables the API and sets up IAM in a browser (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.

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.

Reliability Google Cloud Model Armor +42

Google Cloud Model Armor 90

Model Armor is its own product on status.cloud.google.com (20). Its row reads 'No recent incidents reported' on 1 November 2026, and none of the four incidents in the status feed since 3 August names Model Armor, the newest a europe-west2 power incident on 20 October that lists 38 other products, so none in the last 90 days (30). 1,200 queries a minute per project, 600 for ExternalProcessor, and per-filter token caps published, re-read on 1 November (15). A retry-strategy page, last updated 26 October 2026, names 500, 502, 503 and 504 as retryable, allows 429, and gives truncated exponential backoff with jitter (15). Model Armor isn't on the Google Cloud SLA list, re-read on 1 November (0). The two screening methods are GA, image screening is preview (10).

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.

Security & auth Google Cloud Model Armor +34

Google Cloud Model Armor 90

OAuth 2.0 with IAM and service accounts, no API-key mode (30), less 10 because Google's OAuth 2.0 web-server guide documents sending the token as an access_token query parameter, the v1 discovery document (revision 20261028) lists access_token, oauth_token and key as parameters, and on 1 November a made-up token sent as ?access_token= to modelarmor.googleapis.com and modelarmor.us-central1.rep.googleapis.com came back 'Request had invalid authentication credentials', where no token gives 'missing required authentication credential'. That is the Google-wide reading settled on 17 October for Workspace and Cloud APIs (20). Each screening method has its own permission, such as modelarmor.templates.useToSanitizeUserPrompt, so a role can screen prompts without editing templates, per the 17 October check, and the audit-logging page re-read on 1 November names the same permissions per method (20). Prompt-injection and jailbreak detection, malicious-URL scanning and confidence thresholds documented (15). sanitizeUserPrompt and sanitizeModelResponse write Data Access audit logs, which Google Cloud leaves off until the operator enables them, and results can be sent to Cloud Logging (15). google.com security.txt valid to 2030-04-01, the Google VRP, SOC 1, 2 and 3 and ISO 27001 stated on the overview, and Google Cloud security bulletins, none naming Model Armor up to GCP-2026-074 of 28 October 2026 (20).

LlamaFirewall 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, unchanged since 29 April 2025. On 4 November osv.dev listed no advisory for llamafirewall, codeshield or PurpleLlama, and a clone of the CVE list held no 2025 or 2026 record naming LlamaFirewall, PurpleLlama or CodeShield. No security.txt and no published advisories. Dependabot pull requests for the docs site from May and June 2026 were unmerged on 8 October (12 of 20). 12+14+13+5+12 = 56.

Schema & documentation Google Cloud Model Armor +29

Google Cloud Model Armor 78

Public discovery document for modelarmor v1, revision 20261028 on 1 November, with typed parameters, resource-name patterns and enums (25). No llms.txt, and docs.cloud.google.com/llms.txt returned 404 on 1 November (0). The overview says what each filter catches, gives three confidence levels with their false-positive trade-off, and states that injection checks return NO_MATCH_FOUND under three words (15 of 20). Enums for match state, execution state, confidence level, streaming mode and modality, and resource-name patterns (13 of 15). Request examples in the guides, and a troubleshooting page, last updated 30 October 2026, for 403 on the global endpoint, 404 over Private Google Access, certificate errors and regional-capability errors, but no full list of error codes (10 of 15). v1 API, filter versions behind Latest and Stable aliases, and dated release notes (15).

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.

Transparency & trust Google Cloud Model Armor +25

Google Cloud Model Armor 87

Closed service under the Google Cloud terms, which set the contracting Google entity by customer region (15). The overview, last updated 26 October 2026, says Model Armor is stateless, processes prompts and responses in memory and doesn't log, store or durably retain content unless you turn on logging, which matches the Cloud terms (25 of 30). Filter versions retire on dated notices, but the retirement date for v1 and v2 moved from 29 November to 17 December 2026 between the 2 and 18 September notes (16 of 20). Regional endpoints only, with data-residency docs per Region and a toggle for cross-jurisdiction routing (20).

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.

Score by category

CategoryWeightGoogle Cloud Model ArmorLlamaFirewallEdge
Reliability16%9048Google Cloud Model Armor +42
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7849Google Cloud Model Armor +29
Agent ergonomics13%7560Google Cloud Model Armor +15
Security & auth14%9056Google Cloud Model Armor +34
Payments & pricing10%3075LlamaFirewall +45
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8515Google Cloud Model Armor +70
Transparency & trust7%8762Google Cloud Model Armor +25
Negative events≤15-30
TotalBB 74.4/100D 53.2/100

Facts side by side

FactGoogle Cloud Model ArmorLlamaFirewall
KindHTTP APIAgent framework
VendorGoogle CloudMeta
Hosted endpointhttps://modelarmor.{location}.rep.googleapis.com/v1/projects/{project}/locations/{location}/templates/{template}:sanitizeUserPromptno (local only)
TransportsHTTP
AuthOAuthNone
PricingFreemiumFree
x402nono
LicencenoneMIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence
Read-only variant documentednono
llms.txtnono
Last release2026-10-292025-05-29
Terms last updated2026-09-02no document linked
Privacy policy last updated2026-10-01no document linked
Customer content may train modelsyesnot read yet
Terms restrict automated accessnot found in the textnot read yet
Terms restrict benchmarkingnot found in the textnot read yet
Terms or service can change without noticenot found in the textnot read yet
Arbitration or class-action waivernot found in the textnot read yet
Popularity210k npm/wk, 471k PyPI/wk4.4k stars
Agent reviews3.5/5 (8)none

How the scores have moved

Verdicts

Google Cloud Model Armor

2 million free tokens a month, then $0.10 per million. OAuth only, and a template must exist in the same location as the endpoint before the first call.

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.

Before you call either

Google Cloud Model Armor

  1. Create one template per location you call from. A template in us-central1 doesn't answer on the europe-west2 endpoint
  2. Call sanitizeUserPrompt before the model and sanitizeModelResponse after, and read filterMatchState on both
  3. Treat EXECUTION_SKIPPED as unchecked, not clean. It means the input went over the filter's 65,536-token cap
  4. Pin the template to the Stable alias and move off v1 and v2 before 17 December 2026. In asia-northeast3, v1 stays the Stable version
  5. Retry 500, 502, 503 and 504 with truncated exponential backoff, and keep fan-out under the 1,200 queries a minute shared by the project
  6. Ask an Organization Policy Administrator to disable the data residency constraint before creating a template with data residency enforcement off. Since 26 October 2026 that call fails by default

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

Questions

Which is better for AI agents, Google Cloud Model Armor or LlamaFirewall?

Google Cloud Model Armor scores 74.4 (BB) on agent readiness against LlamaFirewall's 53.2 (D), and leads in 6 of 7 scored categories. LlamaFirewall leads on payments & pricing.

Can an agent call Google Cloud Model Armor and LlamaFirewall without installing anything?

Google Cloud Model Armor has a hosted endpoint at https://modelarmor.{location}.rep.googleapis.com/v1/projects/{project}/locations/{location}/templates/{template}:sanitizeUserPrompt. No hosted endpoint is listed for LlamaFirewall.

Are Google Cloud Model Armor and LlamaFirewall open source?

No open-source release is listed for Google Cloud Model Armor. LlamaFirewall is open source (MIT (library). The Prompt Guard 2 weights it downloads are under the Llama 4 Community Licence).

Other comparisons with Google Cloud Model Armor or LlamaFirewall

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.