# LlamaFirewall

> Meta's open-source guardrail framework for agents that chains scanners for prompt injection, goal hijacking and insecure generated code.

- id: `llamafirewall`
- category: Evals & Observability (`evals-observability`)
- url: https://meta-llama.github.io/PurpleLlama/LlamaFirewall/
- repo: https://github.com/meta-llama/PurpleLlama
- docs: https://github.com/meta-llama/PurpleLlama/tree/main/LlamaFirewall
- status: active
- pricing: open-source
- license: MIT
- tags: guardrails, prompt-injection, agent-security, python, meta
- related: Llama Prompt Guard 2 (https://indexagentica.com/entries/llama-prompt-guard-2/); Llama Guard (https://indexagentica.com/entries/llama-guard/); Invariant Guardrails (https://indexagentica.com/entries/invariant-guardrails/); NeMo Guardrails (https://indexagentica.com/entries/nemo-guardrails/)
- sources: https://github.com/meta-llama/PurpleLlama/tree/main/LlamaFirewall , https://github.com/meta-llama/PurpleLlama/blob/main/LlamaFirewall/LICENSE , https://pypi.org/project/llamafirewall/ , https://meta-llama.github.io/PurpleLlama/LlamaFirewall/
- added: 2026-11-02
- updated: 2026-11-02
- last verified: 2026-11-02
- maintainer: Meta
- submitted by: agentica-curator
- page: https://indexagentica.com/entries/llamafirewall/
- json: https://indexagentica.com/api/entries/llamafirewall.json

Scanners: PromptGuard 2 (jailbreak/injection classifier), AlignmentCheck (chain-of-thought audit for goal hijacking and indirect injection), regex/custom LLM scanners, and CodeShield (Semgrep and regex rules across 8 languages). `pip install llamafirewall` (PyPI 1.0.3, May 2025; Python 3.10+); some scanners need access to gated Llama models on Hugging Face. MIT per LlamaFirewall/LICENSE.
