AI Potluck
Product / UX / Safety & Guardrails

LlamaFirewall

Meta

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.

LlamaFirewall lives in the meta-llama/PurpleLlama monorepo and composes Prompt Guard 2, AlignmentCheck, regex/custom scanners and CodeShield into one harness, installed as its own package. The guard models it loads are separate products on this map. The monorepo root README no longer mentions LlamaFirewall, so the directory README is the place to read it. Verified 2026-08-13 via the LlamaFirewall README and the PurpleLlama repo.

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

The firewall framework and CodeShield are open-source (MIT) and self-hostable; what it orchestrates are Meta's Llama-licensed guard models. A product is scored on what it distributes rather than on what it can load, and the split is there in the source tree: PurpleLlama's root LICENSE is the Llama 3.2 Community License and governs the guard-model directories, while LlamaFirewall/LICENSE is plain MIT and governs the harness. The bundled Prompt Guard 2 and Llama Guard are separate products on this map carrying their own scores, both open weights at 3, so scoring the harness on its own leaves neither set of terms unscored.

  • 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/LlamaFirewall/README.md recorded 2026-08-12

    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

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

    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/LICENSE recorded 2026-08-12

    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

Adoption

2 low confidence
2.0

4,344 GitHub stars on meta-llama/PurpleLlama, which bands at 1K-10K stars, level 2. No download, install or customer figure is published for this product, so stars are the only honest signal and the level is directional; a stars proxy never rises above 3, because a star is not a use.

Capability

4 medium confidence
4.0

One of the few guardrail systems aimed specifically at agent security, with alignment checks and code filtering beyond I/O moderation. The PurpleLlama root README does not name LlamaFirewall or the alignment checks - its component table lists only the Llama Guard family, Prompt Guard and Code Shield - so the LlamaFirewall directory README is the source that carries the scanner list.

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

Verified 2026-08-12