LlamaFirewall
Meta's open-source guardrail framework for agents that chains scanners for prompt injection, goal hijacking and insecure generated code.
Tags
Description
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.
Related
- Llama Prompt Guard 2: Meta's small open-weight classifiers (86M and 22M) that flag prompt injection and jailbreak attempts in user input and untrusted content.
- Llama Guard: Meta's open-weight safety classifiers that label LLM prompts and responses as safe or unsafe against the MLCommons hazard taxonomy.
- Invariant Guardrails: Rule-based guardrails that sit between an agent and its MCP servers or LLM provider, checking and blocking tool calls and messages.
- NeMo Guardrails: NVIDIA's open-source toolkit for adding programmable guardrails to LLM-based conversational systems.
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/
Machine-readable
- JSON
- Markdown
- Source file on GitHub (edit via pull request)