Back to Gap Map Product / UX / Safety & Guardrails

LlamaFirewall

Meta
open source / Overall score: 3.0

Meta's open, system-level guardrail framework for AI agents (part of PurpleLlama). It composes layered defenses: Prompt Guard 2 (jailbreak/injection detection), Agent Alignment Checks (detecting goal hijacking), and CodeShield (filtering insecure generated code), into a real-time firewall around agent execution.

The guard models LlamaFirewall loads, Prompt Guard 2 and Llama Guard, are separate entries on this map.

Openness

5 high confidence
5.0
license
MIT(LlamaFirewall/LICENSE, covering the LlamaFirewall and CodeShield code)
source
public(github.com/meta-llama/PurpleLlama, LlamaFirewall/)
framework
open(LlamaFirewall + CodeShield code, MIT-licensed in PurpleLlama)
self-host
yes
note
bundled guard models (Prompt Guard 2, Llama Guard) carry the Llama Community License

LlamaFirewall and CodeShield, the harness code, are MIT-licensed under LlamaFirewall/LICENSE and self-hostable. PurpleLlama's root LICENSE, the Llama 3.2 Community License, covers only the separate guard-model directories; the guard models the harness orchestrates, Prompt Guard 2 and Llama Guard, are separate products with their own license terms.

  • https://github.com/meta-llama/PurpleLlama recorded 2026-06-29

    PurpleLlama: MIT evals + Llama-licensed safeguard models; ~4.2k stars; LlamaFirewall, Prompt Guard, CodeShield components

  • https://github.com/meta-llama/PurpleLlama/blob/main/LICENSE recorded 2026-10-13

    the monorepo root LICENSE is the LLAMA 3.2 COMMUNITY LICENSE AGREEMENT, which is what covers the guard-model directories alongside the harness: the repo tree holds Llama-Guard, Llama-Guard2, Llama-Guard3, Llama-Guard4, Llama-Prompt-Guard-2 and Prompt-Guard beside LlamaFirewall and CodeShield, and GitHub reports the repo license as NOASSERTION

  • https://github.com/meta-llama/PurpleLlama/blob/main/LlamaFirewall/LICENSE recorded 2026-10-13

    the LlamaFirewall directory carries a plain MIT License, "Copyright (c) Meta Platforms, Inc. and affiliates", granting use, copy, modify, merge, publish, distribute, sublicense and sell without restriction

  • https://github.com/meta-llama/PurpleLlama/blob/main/LlamaFirewall/README.md recorded 2026-10-13

    the whole product installs and runs locally - prerequisites are Python 3.10, pip and a HuggingFace account for the Llama models, installation is `pip install llamafirewall`, and the basic usage example instantiates LlamaFirewall in-process. No paid tier, no hosted service and no license key appears anywhere in the document; the scanners it lists (PromptGuard 2, AlignmentCheck, regex/custom, CodeShield) are all in the published package

Adoption

2 low confidence
2.0

No download, install or customer figure is published for LlamaFirewall, so GitHub stars on the PurpleLlama monorepo are the only available adoption signal. A star is not a use, so this measures visibility rather than how much the firewall is actually run.

Capability

4 medium confidence
4.0

LlamaFirewall is aimed at agent security rather than chat moderation alone. Beyond screening inputs for injection, it audits an agent's reasoning for goal hijacking and scans the code an agent writes before it runs.

  • https://github.com/meta-llama/PurpleLlama recorded 2026-08-13

    Root README describes Purple Llama as an umbrella project and tables its components - Cyber Security Eval under MIT, the Llama Guard family and Prompt Guard under Llama Community licenses, and Code Shield under MIT, which it describes as inference-time filtering of insecure generated code, code-interpreter abuse prevention and secure command execution. It does not mention LlamaFirewall.

  • https://github.com/meta-llama/PurpleLlama/blob/main/LlamaFirewall/README.md recorded 2026-08-13

    The directory README lists the scanners the harness composes - PromptGuard 2, AlignmentCheck, regex/custom and CodeShield - all in the published package, installed with `pip install llamafirewall` and instantiated in-process.

  • https://pypi.org/pypi/llamafirewall/json recorded 2026-09-29

    The PyPI JSON for llamafirewall 1.0.3 carries the package README, which describes the harness as combining "PromptGuardScanner, AlignmentCheckScanner, CodeShieldScanner, and customizable regex filters", built "for low-latency environments with support for high-throughput pipelines", with PromptGuard 2 a classifier that "detects direct prompt injection attempts", AlignmentCheck built to "detect goal hijacking, indirect prompt injections, and signs of agent misalignment", and CodeShield a static analysis engine that "examines LLM-generated code for security issues in real time". It notes that for the alignment check scanner "you will need to set up the Together API key in your environment".

Verified 2026-09-27