NeMo Guardrails vs Meta Purple Llama

NeMo Guardrails fits teams that must write and enforce conversation, topic and output policies inside their own LLM application. Purple Llama fits teams that need safety classifiers or agent and code scanners they can call from any stack, under licenses they have reviewed.

On this page

NeMo Guardrails vs Meta Purple Llama: which to choose first

Choose NeMo Guardrails first when your team must enforce topic, dialog and output rules inside its own LLM application and wants those rules written, versioned and reviewed as code. Choose Purple Llama first when the need is a classifier verdict on a prompt or response, or a scanner for agents or generated code. NeMo Guardrails is an Apache-2.0 library, and v0.25.0 was published to PyPI on November 19, 2026. Its policy lives in a config.yml file, optional Python actions and Colang files, and it supports input, dialog, retrieval, execution and output rails. A compliance lead can read a Colang flow, and a version control diff shows who changed a topic rule and when.

Purple Llama is a set of separate components, and each carries its own license. CyberSecEval and Code Shield are MIT licensed, Llama Guard 3 and Prompt Guard use the Llama 3.2 Community License, and Llama Guard 4 and Prompt Guard 2 ship under the Llama 4 Community License Agreement. LlamaFirewall, the MIT-licensed layer, combines PromptGuard 2 for direct injection, AlignmentCheck for agent reasoning and CodeShield for generated code, and its AlignmentCheck scanner requires a Together API key, so confirm that dependency with your security team early. Llama Guard 4 returns a safety verdict on prompts and responses, but your team still writes the dialog flow, the escalation path and the wording of each refusal in its own code. Read the PurpleLlama repository license table before you list any component in a design document.

Three decisions settle the first choice. First, decide where the control must sit: inside the dialog flow of the application, as a gateway in front of model endpoints, or as a check in CI. Second, ask legal which license terms it accepts, since Apache-2.0 and MIT are widely reviewed as permissive while the Llama community licenses carry their own terms that legal should read in full. Third, confirm that your team can run Python services and model endpoints, because NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13 and LlamaFirewall requires Python 3.10 or later. NVIDIA sunset the NeMo Guardrails microservice on October 1, 2026, so if your plan assumed that container, read the NeMo Guardrails library vs NeMo Guardrails microservice comparison before you commit.

NeMo Guardrails or Purple Llama: which scenario points where

This table matches common team scenarios to the tool that fits them better, with the condition that makes it the better fit and the dependency to confirm before committing. Several answers depend on model license terms, API keys and your own language or framework choices, so check each row against your architecture. The main takeaway: NeMo Guardrails fits dialog, retrieval and tool-flow control, while Purple Llama fits classifier, agent-audit and generated-code layers.

ScenarioBetter fitCondition that makes it the better fitDependency to confirm
Customer-facing assistant that must stay on topicNeMo GuardrailsColang dialog and topic rails define allowed conversation flows and off-topic responses directly.Which topic safety model you run, and whether you host it or call an external service.
RAG assistant that must filter retrieved chunksNeMo GuardrailsRetrieval rails inspect chunks before they reach the model, a rail type NeMo names explicitly.Whether a Llama Guard 4 classifier on chunks meets your policy, or you need custom rail logic.
Agent that calls tools and must audit its reasoningPurple Llama (LlamaFirewall)AlignmentCheck audits agent reasoning, and LlamaFirewall ships demos for OpenAI Agents and LangChain.A Together API key for AlignmentCheck, and review of what reasoning data it sends externally.
Agent that needs custom tool and action validationNeMo GuardrailsExecution rails cover custom actions and tools, written as Python actions alongside Colang files.Python 3.11 to 3.13 for NeMo Guardrails 0.25.0, and the call path from your agent framework.
Coding assistant whose output reaches productionPurple Llama (CodeShield)CodeShield statically analyzes generated code in 8 languages using Semgrep and regex rules.Whether your languages are among the eight supported, and which Semgrep rules you need.
Team with its own policy logic that wants only a classifierPurple Llama (Llama Guard 4, Prompt Guard 2)Llama Guard 4 classifies prompts and responses, and your code applies the decisions without a dialog layer.Llama 4 Community License terms for both models, reviewed by your legal team before use.
Existing NeMo Guardrails microservice userNeMo Guardrails libraryNVIDIA sunset the microservice on October 1, 2026, while the open-source library still ships releases.Next steps with your NVIDIA account team, and whether NeMo Helix fits your inference path.
Team that wants one Apache-2.0 library and minimal license reviewNeMo GuardrailsThe library is Apache-2.0, so license review focuses on the models you choose to enable.License terms of each NVIDIA safety model you enable, checked on that model's own page.

How NeMo Guardrails and Purple Llama components sit in the request path

The five pieces below run at different points in the request path: a library inside your application, a container or gateway you deploy, and classifier models or a Python framework that screen inputs and outputs. Decide which of them your team will operate before you compare the two platforms, because each choice changes what you patch, host and authenticate.

NeMo Guardrails Python API and server

This is the NeMo Guardrails Python library, which you import into your application or run as a guardrails server that loads configurations from a folder and exposes an HTTP API. Its five rail types are input, dialog, retrieval, execution and output, and version 0.25.0 needs Python 3.11, 3.12 or 3.13. Version 0.25.0 deprecates LLMRails in favor of Guardrails, with removal planned no earlier than 0.27.0, so schedule that code change before you upgrade. Confirm how the server authenticates callers and whether it can sit behind your existing API gateway.

NeMo Guardrails docs

Docker image built from config

You build this image from a folder holding config.yml, optional Python actions and Colang files, using the Dockerfile provided with the library. You own the image, so version it, scan it and store it in your own registry. Every configuration change means a rebuild and a redeployment. Colang 1.0 is the default and Colang 2.x is also supported, and the nemoguardrails convert tool still needs manual review of its output. Do not use the NGC microservice container for this, since NVIDIA no longer supports that artifact. Confirm where model API keys are injected and who approves configuration changes.

Colang migration guide

NeMo Helix gateway middleware plugin

NeMo Helix is an Apache-2.0 control plane whose documentation runs NeMo Guardrails as an inference gateway middleware plugin that applies guardrail configurations to model endpoints. Here the team operates a gateway in front of its models, so one policy change can reach every endpoint it covers. The NeMo Platform link in NVIDIA's microservice sunset notice now resolves to Helix, which makes it a path existing microservice users should evaluate with NVIDIA. Confirm its production support status, which Guardrails version it bundles, and how it handles SSO, admin access and log retention.

Helix guardrail docs

Llama Guard 4 and Prompt Guard 2

Llama Guard 4 is a 12-billion-parameter multimodal model that labels prompts and responses against the MLCommons hazards taxonomy, and it replaces Llama Guard 3-8B and 3-11B-vision. Prompt Guard 2 comes in 86M and 22M versions that label prompts as benign or malicious for injection and jailbreak attempts, with a 512-token context window. You host the weights on your own compute or call a hosted endpoint, and the hosted option sends prompts to another party. Both ship under the Llama 4 Community License Agreement, so have legal review those terms before production. Treat each new model version as a change that requires re-running your test set.

Llama Guard 4 model card

LlamaFirewall and CodeShield framework

LlamaFirewall is an MIT-licensed Python framework, installed with pip install llamafirewall on Python 3.10 or later, that layers PromptGuard 2, AlignmentCheck, CodeShield and regex or custom scanners across chat models and agents. CodeShield statically analyzes generated code in 8 languages using Semgrep and regex rules. The team operates a library inside its own application code, so every model call and agent tool path must be wired to it. AlignmentCheck requires a Together API key, so confirm where agent transcripts are sent and who holds that key. Pin the version, since 1.0.3 is the latest release on PyPI, and retest after each upgrade.

LlamaFirewall README

NeMo Guardrails vs Purple Llama, capability by capability

This table compares NeMo Guardrails and Meta Purple Llama on license, policy, detection, agent and code protection, server and Python requirements. Llama Guard, Prompt Guard and LlamaFirewall are separate components you assemble, so confirm how they fit your stack. The main takeaway is that NeMo gives you a configurable rail layer with its own policy language, while Purple Llama gives you classifiers and scanners to wire into your code. Rows that say to confirm need a written answer from the vendor before you choose either option.

CapabilityNeMo GuardrailsMeta Purple Llama
License and latest releaseApache-2.0. Version 0.25.0 published November 19, 2026 on PyPI, after 0.24.1 in September.MIT for LlamaFirewall (1.0.3 is latest on PyPI). Llama Guard 4 and Prompt Guard 2 use the Llama 4 Community License.
Policy authoring and rail typesConfig.yml with Colang 1.0 (default) or 2.0. Five rail types: input, dialog, retrieval, execution and output.Llama Guard and Prompt Guard are models; LlamaFirewall is a Python framework that layers scanners across chat models and agents.
Prompt injection detectionLibrary includes jailbreak and injection detection. Confirm which models and thresholds it uses in your setup.Prompt Guard 2 in 86M and 22M versions, labels prompts benign or malicious, 512-token context window.
Hazard classificationSelf-check moderation and NVIDIA content and topic safety models. Confirm the category list each model covers.Llama Guard 4 (12B multimodal) classifies prompts and responses against the MLCommons hazards taxonomy.
Agent protectionExecution rails apply to custom actions and tools. Retrieval rails apply to RAG chunks.AlignmentCheck audits agent reasoning but needs a Together API key. Demos cover OpenAI Agents and LangChain.
Code safetyNo dedicated code scanner documented. Confirm with NVIDIA whether generated code is checked.CodeShield statically analyzes LLM-generated code in 8 languages using Semgrep and regex rules.
HTTP serverGuardrails server loads configs from a folder and exposes an HTTP API with /v1/chat/completions. Dockerfile included.Documented as a Python package. Confirm whether an HTTP service exists or whether you must build one.
Python requirementPython 3.11, 3.12 or 3.13 (version 0.25.0).Python 3.10 or later. Install with pip install llamafirewall.
Identity, audit logging and access controlConfirm SSO support, audit logging and access control with NVIDIA before you commit.Confirm with Meta whether LlamaFirewall offers identity, audit logging and access control, or whether your own code must add them.

Which licenses and paid editions apply to each option

The NeMo Guardrails library is the part of the NeMo family you can still install, read and modify under an open license. It is licensed under Apache 2.0 and developed in the NVIDIA-NeMo/Guardrails repository, and NVIDIA still publishes new releases of it. The current release is 0.25.0, published on 19 November 2026, following 0.24.1 on 16 September 2026. Most of the licensing decisions in this comparison start here.

  • License: Apache 2.0 covers the library code. Read the LICENSE.md file for the full terms before your legal review.
  • Release cadence: Pin a version in your build and track release notes, since 0.25.0 is the newest release at the time of writing.
  • Deprecations: 0.25.0 deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0. NVIDIA publishes a 0.25 migration guide for this change.
  • Paid editions: No paid edition of the library is documented here, so ask NVIDIA whether enterprise support or a commercial agreement exists, and do not assume one does.
  • Models and integrations: The library includes content safety and topic safety models and third-party integrations. Confirm the license of each model or integration you load, because those terms may differ from the Apache 2.0 license on the library code.

Before a production decision, have counsel read the LICENSE file for the exact version you intend to deploy.

What recurs in the running cost of each option

The running cost of NeMo Guardrails is mostly people and compute, and both recur. Your engineers own the config.yml file, the Colang files and any Python actions, so every policy change, new tool and library upgrade lands on someone's sprint. Set the runtime early: release 0.25.0 requires Python 3.11, 3.12 or 3.13, and that interpreter needs patching on your own schedule. The guardrails server is hosting you pay for. The largest variable is model calls. Self-check input and output moderation, and any fact-checking or hallucination rail, can call a model on each request, which multiplies inference spend. Ask your team to count the model calls per request for each rail set before sizing capacity. Plan for the LLMRails deprecation too: NVIDIA plans removal no earlier than 0.27.0, so the move to Guardrails recurs in each upgrade cycle until it is finished.

Purple Llama costs are mostly hosting and integration, and hosting depends on which model you run. Llama Guard 4 is a 12-billion-parameter classifier, so size accelerator capacity for it at your peak request volume. Prompt Guard 2 is lighter: the 86M and 22M versions are small classifiers, and the model card says the 22M version, based on DeBERTa-xsmall, cuts latency and compute costs by 75% with minimal performance trade-offs. Treat that figure as the vendor's comparison and measure it against your own baseline before budgeting. LlamaFirewall is MIT-licensed, but Llama Guard 4 and Prompt Guard 2 ship under the Llama 4 Community License Agreement, so license review is a one-time task that repeats whenever models change. AlignmentCheck needs a Together API key, so confirm who holds that account and who pays its bill.

Split the budget into one-time and recurring lines. One-time costs are setup, policy design in Colang or model selection, the first test pass, and any migration off LLMRails or an older configuration. Recurring costs are hosting, upgrades, retesting after each policy or model change, and any retainer. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, while ongoing support, upgrades and continuous testing are offered as retainers, so ask for those terms separately. In any written quote, ask for: the named components in scope (NeMo rails, the Guardrails server, Llama Guard 4, Prompt Guard 2, LlamaFirewall), the deliverables for each, whether retesting after go-live is included, and who runs upgrades after handover, your team or a retainer.

Moving between NeMo Guardrails and Purple Llama: what transfers and what is rebuilt

This sequence moves guardrail coverage from one stack to the other without losing what you already proved. The team keeps its test prompts as the portable asset, sorts controls into classifier verdicts and dialog or output rules, and cuts over only after both paths agree on the same test set.

  1. Inventory current guardrail behavior and tests

    The team that owns the application lists every guardrail in production today: input checks, dialog flows, output filters and tool permissions. For each one, it writes test prompts that should be blocked and benign prompts that should pass, and keeps them in version control as the carry-over asset. If the current deployment is the NeMo Guardrails microservice, confirm the next step with NVIDIA, since the microservice was sunset as of October 1, 2026. Done when every control has at least one passing and one failing test on record.

  2. Sort controls into classifiers and rules

    Decide which controls become classifier verdicts and which stay as dialog or output rules. Prompt injection and unsafe content checks often map to a classifier such as Llama Guard 4, which labels prompts and responses against the MLCommons hazards taxonomy, or Llama Prompt Guard 2, which labels prompts benign or malicious. Topic boundaries, scripted refusals and multi-turn conversation flows usually stay as rules, because a classifier returns a label and does not manage a conversation. Record each decision with an owner and the matching test IDs. Done when every control has one target and none appears twice.

  3. Fix one enforcement decision point

    Keep one decision point in the application or gateway so enforcement logic lives in one place and does not move twice. Whether that point calls the NeMo Guardrails Python API or server, or a Purple Llama classifier behind your own service, the caller should make the allow, block or rewrite call. Define the contract now: input fields, verdict codes, and the response when a check errors out or times out. Done when a design review confirms that swapping the backing check changes no caller code.

  4. Rebuild Colang rules as code or config

    Rebuild the Colang rules as code or configuration for the other tool. Classifier outputs do not port into Colang, and Colang does not port into a classifier, so plan for a rewrite of the logic. Within NeMo Guardrails, moving from Colang 1.0 to 2.x can start with the nemoguardrails convert tool, but NVIDIA's Colang 2 migration guide says converted configurations still need manual review. Llama models also need license sign-off before cutover, since Llama Guard 4 and Prompt Guard 2 ship under the Llama 4 Community License Agreement. Done when the rebuilt rules pass the test prompts from step one in a staging build.

  5. Run both paths against one test set

    Run the existing NeMo Guardrails path and the new Purple Llama path in parallel against the same test set from step one. Score each prompt with the same pass criteria: blocked when it should be blocked, allowed when it should pass, and logged in the same format. Compare false blocks and misses per control, and review every disagreement by hand before deciding which path is correct. Done when the team signs off on a written results table, with each disagreement either fixed or accepted as a known gap.

  6. Switch traffic and retire old configuration

    Switch production traffic to the new path only after the license sign-off and the parallel results are both on file. Keep the old configuration available for a rollback window the team sets in advance, and watch block rates and error logs during the first live period. Then remove the old Colang files, config.yml and any unused server image, and archive the test set and results with the change record. Done when the old configuration is removed from the deployment repository and the rollback path has been tested.

Where each control sits in a request and who owns the decision

The diagram starts with a user request entering the team's gateway or application, which sits inside the team's trust boundary. From there it follows one of three paths. In the NeMo Guardrails path, input, dialog, retrieval, execution and output rails wrap the LLM call, and the rails are configured in Colang. In the Purple Llama path, the application calls a classifier and its own code decides whether to allow or block. In the agent path, LlamaFirewall scanners check tool calls, CodeShield checks generated code, and AlignmentCheck calls the Together API, which sits outside your infrastructure. Check which decision point your team would own in each path before you choose.

Three request paths, with the external Together API outside the trust boundary.

Where NeMo Guardrails and Purple Llama projects usually run long

NeMo Guardrails projects usually run long because of policy decisions, and installation is the short part. Version 0.25.0 needs Python 3.11, 3.12 or 3.13, and the server or library loads its setup from a folder holding config.yml, optional Python actions and Colang files. The larger effort is design. Each rail type (input, dialog, retrieval, execution and output) needs Colang flows that policy owners have agreed in writing, and each flow needs its own tests. Expect the most delay where policy owners disagree on what a dialog rail should refuse or where a topic boundary sits. Colang 1.0 is still the default and Colang 2.0 is supported. NVIDIA's NeMo Guardrails Colang 2 migration guide says converted configurations still need manual review, and the LLMRails class is deprecated in favor of Guardrails with removal planned no earlier than 0.27.0. Existing code should be scoped for that change.

Purple Llama projects usually run long on model hosting, license sign-off and testing classifiers against your own data. LlamaFirewall installs with pip install llamafirewall and needs Python 3.10 or later, but its scanners depend on models you host or call. LlamaFirewall is MIT licensed, while Llama Guard 4 and Prompt Guard 2 ship under the Llama 4 Community License Agreement, so legal and procurement should review both before the build starts. The README ships demos for OpenAI Agents and LangChain, so integration mostly means wiring the scanners into your agent framework's message and tool path. AlignmentCheck requires a Together API key, so confirm where that traffic goes before enabling it. The most common delay comes from checking whether Prompt Guard 2 labels match your own prompts and documents, since its 512-token context window and benign or malicious labels set the limits of what it can judge.

What buyers ask before choosing or hiring help

What does it cost to run NeMo Guardrails and Llama Guard yourself?

Running cost is mostly people and compute, since the NeMo Guardrails library is Apache 2.0 licensed and the Llama terms need a separate check. Under that license the code carries no per-seat or per-call charge, but the Llama 4 Community License Agreement governs Llama Guard 4 and must be read on its own. The largest recurring item is engineering time to maintain Colang or validator policies and test sets as the product changes. Compute depends on design: self-check moderation and fact-checking call a model on each request, while a classifier such as Llama Guard 4 needs GPUs or a hosted endpoint. LlamaFirewall's AlignmentCheck scanner needs a Together API key, so plan for that usage. Logging, storage and on-call time also recur. Ask any partner for a quote that separates one-time build work from ongoing support, lists the models and hosting assumed, and states who pays for model API usage.

Can our team run NeMo Guardrails without an implementation partner?

Yes, if the team already has Python services, named policy owners and people who can run tests, a partner is optional. NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, and its Python API or guardrails server loads configurations from a folder, so an engineer who can ship a service can run it. The harder parts are policy work: someone must write the rules, decide what is blocked and who approves changes, and keep a regression set of attacks that runs in CI. Colang 1.0 is the default and Colang 2.0 is supported, so decide which one your team will use before you start. A partner adds the most value when the team lacks red-team capacity, must document controls for a compliance review, or needs an independent test of the guardrails. Otherwise the work looks like any internal service with a test plan.

How long does a NeMo Guardrails project take to deliver?

The duration comes from the written scope, and no fixed length applies to every team. A scope that defines the platform, the rails or validators to build, the attack categories to test and the integration points gives the schedule its shape. Work usually splits into discovery of current model calls and data flows, policy design with the owners who decide what is blocked, implementation in your environment, a test and tuning round, and handover of the configuration and runbooks. Items that stretch the schedule include waiting for model hosting approvals, changes to the Colang version in use, and how many policy owners must sign off. Ask for milestones with the dependencies named, the client tasks listed and the retest included in the plan. Most engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts. Ask any team you hire how it would staff each milestone.

Does the NeMo Guardrails microservice sunset affect the open-source library?

No, the sunset applies to the microservice container, while the open-source library keeps shipping. NVIDIA's NGC catalog page says the NeMo microservices container has been sunset as of October 1, 2026, with no new releases and no support for that artifact. The library is a separate package: nemoguardrails 0.25.0 was published to PyPI on November 19, 2026 under Apache-2.0, following 0.24.1 on September 16, 2026. NVIDIA's archived documentation says new development has moved to NeMo Platform, and the repository linked from that notice now resolves to NeMo Helix, where guardrails run as an inference gateway plugin. If you run the microservice today, contact your NVIDIA account team about next steps and plan a migration to the library or to NeMo Helix. Check the 0.25 migration guide before you upgrade, because the LLMRails class is deprecated in favor of Guardrails with removal planned no earlier than 0.27.0.

Can Llama Guard 4 be used in a commercial product?

Whether you can ship it depends on the Llama 4 Community License Agreement, which governs Llama Guard 4, so read that agreement with counsel before a commercial release. Llama Guard 4 is a 12-billion-parameter multimodal safety classifier that labels both prompts and responses against the MLCommons hazards taxonomy. Its license is separate from the MIT license on LlamaFirewall and the Apache 2.0 license on NeMo Guardrails, so a stack that combines them carries more than one set of terms. Ask counsel to check the acceptable use terms, the conditions on redistribution and attribution, and any terms that depend on your scale or user base. Calling the model through a NeMo Guardrails rail does not change its terms, so record the license version you reviewed in your release file.

Do these AI guardrail tools produce audit evidence for compliance?

Yes, they produce records that support an assessment, but they do not produce an audit report or a certification. NeMo Guardrails configurations, server logs and the results of any tests you run give an assessor material to review, and LlamaFirewall adds scanner output to the same picture. An auditor or certification body decides whether those records meet a framework, and DeployOpen does not issue audit reports, attestations or certifications. DeployOpen prepares systems, controls and evidence for compliance assessments, such as configuration baselines, logging settings, access controls and retest records for your assessor to review. Ask the assessor which evidence formats and retention periods they accept before you design the logs. Ask any partner to map each record to the control it supports, in writing.

How DeployOpen helps choose, implement or migrate either option

DeployOpen helps teams choose between NeMo Guardrails and Meta Purple Llama, then plans, implements and documents the option they pick inside their own infrastructure. Where a team is moving from one to the other, we scope the migration in writing before work starts. Each engagement is fixed-scope, with deliverables and timelines agreed up front.

How we scope

  • The written scope names each NeMo Guardrails or Purple Llama component in use and flags any microservice still running.
  • Scope lists the model endpoints, agent tools and data sources to cover, with acceptance criteria for each.
  • Scope states whether the team needs Colang rails, Llama Guard classifiers or LlamaFirewall, and which licenses apply to each.

How we build

  • Build installs NeMo Guardrails or the chosen Purple Llama components in your own cloud, data center or air-gapped network.
  • Build covers Colang flows and config.yml for NeMo, or Llama Guard and Prompt Guard setup for Purple Llama.
  • Testing runs your attack set against the guardrails, with each blocked and missed case logged and traceable.

How we hand over

  • Handover includes architecture notes, configuration files, runbooks and the evidence the team's compliance reviewers will ask for.
  • Documentation records the license for each component, including the Llama 4 Community License on Llama Guard 4.
  • Migration notes cover Colang 1.0 to 2.x moves, which NVIDIA says still need manual review after conversion.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
  • Upgrades track NeMo Guardrails releases, including the 0.25 deprecation of LLMRails, and Purple Llama component version changes.
  • Continuous testing re-runs attack suites after each upgrade, so blocking regressions can be found before production.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.