NeMo Guardrails vs Guardrails AI

NeMo Guardrails fits teams that need conversation flow, topic and dialog control written in Colang. Guardrails AI fits teams that want validators from a Hub and Pydantic-shaped output. The choice turns on the risks you must block and who maintains the policies.

On this page

Which NeMo Guardrails or Guardrails AI fits your LLM app

Choose NeMo Guardrails when you need to control how a conversation moves. Its Colang policies define dialog and topic rails, so you can state which subjects the assistant handles, how it steers away from others, and what it does when a user pushes a flow off script. It also supports input, dialog, output, retrieval and execution rails in one configuration, which suits a pipeline where a retrieved chunk, a tool call and a final answer each need a check. NeMo Guardrails 0.25.0, published on November 19, 2026 under Apache-2.0, is the current release. Confirm the Python 3.11 to 3.13 requirement and the LLMRails deprecation against your own build before you commit, since the 0.25 migration guide changes how you load configurations.

Choose Guardrails AI when your main risk is a bad field value or a malformed output. Its guards are built from validators on Guardrails Hub, such as regex matching or toxicity detection, and you chain them on inputs and outputs. It also generates structured output that matches Pydantic models, which helps when downstream systems parse the answer. Guardrails AI 0.11.0, published on August 14, 2026 under Apache-2.0, can run as a standalone service started with guardrails start, so applications that already call an OpenAI-compatible interface can adopt it without restructuring. Check each Hub validator's own license and maintenance status, because the library's license does not carry over to every validator you install.

Decide on three questions before you compare features. First, list the risks you must block, such as off-topic dialog, jailbreaks, data leakage or invalid structure, and map each to a rail or validator. Second, set the latency budget, since every added model call or validator sits in the request path and you should measure it on your own hardware. Third, decide who writes and reviews policies: Colang rules need staff who can read and test dialog flows, while validators need engineers who can pick, tune and version them. Run both against the same test set of attacks and benign prompts, and let the false-positive rate decide the tie.

Who should choose each library by team and environment

A product team building a customer-facing assistant usually needs to keep the bot on approved topics, handle off-scope requests consistently and hold a defined set of responses. NeMo Guardrails fits when those limits are expressed as conversation flows that the team can read and test.

  • Dialog and topic rails: Colang lets the team write allowed flows and off-topic handling in one language, across input, dialog, output, retrieval and execution rails.
  • Built-in safety models: The library includes self-check moderation, jailbreak and injection detection and topic safety models. Evaluate them against your language, traffic and false positive tolerance before relying on them.
  • What you build: The flows themselves, custom actions for tools and the test set that shows each flow behaves as written.
  • Version and deprecation: NeMo Guardrails 0.25.0, published on November 19, 2026, deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0. New code should target the Guardrails class, and existing LLMRails code needs a migration plan.
  • Runtime: The library requires Python 3.11, 3.12 or 3.13, so confirm your application runtime matches before pinning.

Check the NeMo Guardrails documentation against your current LLMRails calls and confirm the migration path with your test team.

Which scenario favors which library and why

This table maps common guardrail scenarios to the library that fits them better and the condition under which the other library wins. Read each row as a starting point for a pilot, then confirm behavior against your own models, policies and latency budget.

ScenarioBetter fit and reasonWhen the other option wins
Blocking off-topic dialog in a customer assistantNeMo Guardrails. Colang dialog and topic rails define allowed conversation flows and steer the bot back on topic.Guardrails AI wins if the requirement is only a per-message classifier check with no conversation flow to manage.
Blocking prompt injection in a RAG pipelineNeMo Guardrails. Retrieval rails screen chunks before they reach the model, and input rails cover the user turn in one configuration.Guardrails AI wins if your team already runs validators from Guardrails Hub on inputs and needs no retrieval-stage control.
Validating output against a JSON schemaGuardrails AI. Structured output matches Pydantic models through function calling or prompt optimization.NeMo Guardrails wins only if schema checks must sit beside dialog policy in the same Colang configuration.
Chaining existing validators such as regex and toxicity checksGuardrails AI. Validators from Guardrails Hub are installed separately and can be chained into one guard.NeMo Guardrails wins if those checks must be combined with dialog or execution rails that Guardrails AI does not model.
Controlling which tools and actions an agent may callNeMo Guardrails. Execution rails cover custom actions and tools as a named rail type.Guardrails AI wins only if tool control is handled by a separate authorization layer and guards only the text.
Exposing one HTTP endpoint to many apps through an OpenAI-compatible interfaceBoth fit. NeMo Guardrails exposes a /v1/chat/completions server, and Guardrails AI runs as a Flask REST service called through the OpenAI SDK.Choose by which policy model your team wants behind the endpoint, not by the endpoint alone.
Teams with a small policy set maintained by developersGuardrails AI. Validator setup is usually simpler to hand off than a Colang policy set.NeMo Guardrails wins when policy owners need to read and change conversation rules over time, and confirm the Colang skills your team has.

How each library is built and what that means for operations

NeMo Guardrails and Guardrails AI both sit in the request path, but they package their checks differently: one as a Colang-configured rail pipeline, the other as chainable validators. The cards below cover how each is built, how you host it, and what you must pin and maintain over time.

NeMo rails as configured stages

NeMo Guardrails organizes checks into five rail types: input rails, dialog rails, retrieval rails for RAG chunks, execution rails for custom actions and tools, and output rails. Each stage is declared in Colang, so the policy lives in configuration files that your security team can read and review alongside the application code. Check which rail types your use case needs before you write any Colang, because retrieval and execution rails only apply when your app uses RAG or tool calls.

NeMo Guardrails repository

Guardrails AI validators from the Hub

Guardrails AI builds input and output guards from validators published on Guardrails Hub, such as regex matching or toxicity detection. Validators are installed separately after pip install guardrails-ai and chained together, so each guard is a list of named checks rather than a dialog flow. Before adoption, confirm each validator's source, license and maintenance status on the Hub, since your guard is only as current as the validators it pulls in.

Guardrails AI quickstart

Python API versus the NeMo server

NeMo Guardrails can be called through its Python API inside your application process, or run as a guardrails server that loads configurations from a folder and exposes an HTTP API. A Dockerfile is provided to build a server image. Embedding in-process ties the rails to your app's release cycle, while a separate server lets several applications share one policy set but adds a network hop and a container to secure and monitor.

Flask service started with guardrails start

Guardrails AI can run as a standalone Flask REST service started with guardrails start and called through the OpenAI SDK. This gives teams a central guard endpoint without writing a new service, but the Flask process becomes a component you must scale, health-check and patch yourself. Ask whether your platform team will run it behind an existing gateway, and test its behavior under your expected concurrency before you commit to it as a shared control.

Version pinning and release cadence

NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, and it deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0. Guardrails AI v0.11.0 was released on August 14, 2026, and its validators are versioned separately. Pin both the library and every validator or Colang dependency in your lockfile, and schedule a migration review whenever a deprecation notice appears in the release notes.

Hosting after the NeMo microservice sunset

Do not plan a new deployment on the NeMo Guardrails microservice. NVIDIA's NGC notice says the NeMo microservices were sunset as of October 1, 2026, with no new releases. Existing users were directed to their NVIDIA account team, and the NeMo Platform repository now resolves to NeMo Helix, which runs NeMo Guardrails as an inference gateway plugin. Confirm with NVIDIA which path it supports for your environment before you design the hosting model.

NGC guardrails container

How a request passes through each guardrail layer

This illustrative flow follows one chat request through NeMo Guardrails, which runs input rails, dialog and topic rails written in Colang, and output rails around the model call. The Guardrails AI layer then runs output validators and checks the result against a Pydantic model, which is where structured output is enforced. The hand-offs to check are the allowed prompt leaving the Colang flow, the raw model output entering validation, and the response reaching the user only after both layers pass. Confirm in your own setup whether the two libraries are chained in one service or run as separate services, because order and latency change with that choice.

Illustrative request path showing where each library's checks sit.

How NeMo Guardrails and Guardrails AI compare on supplied features

This table sets the two Apache-2.0 runtime guardrail libraries side by side on license, release, policy language, rail types, structured output, server mode and Python requirements. Read the cells as the starting point for a proof of concept, and treat every item marked to confirm as an open question for your own environment before you choose.

CapabilityNeMo GuardrailsGuardrails AI
LicenseApache-2.0, developed in the NVIDIA-NeMo/Guardrails repositoryApache-2.0, developed in the guardrails-ai/guardrails repository
Latest supplied release0.25.0, published 19 November 2026 (0.24.1 on 16 September 2026)v0.11.0, published 14 August 2026 (after v0.10.2 on 4 June 2026)
Policy languageColang for input, dialog, output, retrieval and execution railsPython guards built from validators, with validators installed from Guardrails Hub
Dialog and topic controlDialog and topic rails are defined in Colang and are the core of conversation controlNot a supplied feature; confirm whether your required conversation flows can be expressed with validators
Jailbreak and injection detectionListed as a library capability, including jailbreak and injection detection models; confirm model dependencies and latency in your setupDepends on which Hub validators you install; confirm that a suitable injection or jailbreak validator exists and its maintenance status
Structured outputNot a supplied feature in the sources reviewed; confirm if you need schema-bound outputGenerates output matching Pydantic models using function calling or prompt optimization
Server deploymentGuardrails server loads configurations from a folder and exposes an HTTP API, with a Dockerfile for a server imageStandalone Flask REST service started with guardrails start, callable through the OpenAI SDK
Python version requirementPython 3.11, 3.12 or 3.13 for version 0.25.0Not a supplied fact; confirm the supported Python versions for the release you plan to pin
Maintenance noteNVIDIA retired the NeMo Guardrails microservice; the library is still released and is separate from that containerCommunity validator contributions go through Guardrails Hub; confirm the maintainer status of each validator you depend on

Which risks each library must block and what latency each adds

Start by mapping each risk you must block to a specific control in each library, because the two products reach the same outcome by different routes. In NeMo Guardrails, prompt injection and jailbreak attempts are handled by input rails, including the jailbreak and injection detection the library ships, while off-topic use is handled by dialog rails and topic safety models written in Colang. Unsafe output is handled by output rails, and retrieval rails cover chunks pulled into a RAG pipeline. In Guardrails AI, the same risks are handled by input and output guards built from validators on Guardrails Hub, such as regex matching or toxicity detection, chained together. Schema failures, where a model returns output that does not match what your application expects, are a Guardrails AI strength because it generates structured output that matches Pydantic models. Data leakage needs a check on both sides: confirm which validators or output rails your team will run against personal data and secrets, and test them with your own sample records, since neither library's coverage should be assumed complete for your data.

Latency depends on two things: how many checks run in sequence and whether each check calls a model. A chain of validators that are simple pattern matches adds little overhead, while a rail that calls a classifier or a second model for every request adds a model round trip per check. NeMo Guardrails runs a configured set of rails for each conversation turn, so the number of input, dialog, retrieval and output rails sets the per-request cost, and the self-check and content safety rails call models. Guardrails AI validators run in the guard's configured order, so chaining many validators, some of which may call external models, adds cost for each one. Do not rely on vendor figures or on general claims. Build a test harness that replays a representative traffic sample against each candidate configuration, measures added time at p50 and p95 with the same model endpoints you will use in production, and records the result alongside the number of checks that fired. Ask your team to confirm which checks call a model, and confirm the model hosting each one, before you compare the results.

What the Apache-2.0 licenses cover for each library

Both NeMo Guardrails and Guardrails AI are published under the Apache License 2.0, so the license sets the terms for using, modifying and redistributing the library code. The license does not decide whether a platform vendor will keep shipping fixes, and it does not cover models, datasets or third-party packages that a deployment pulls in. Read the license for what it governs, then check the separate questions that the license leaves open.

  • Code use and modification: Apache-2.0 allows you to run, change and embed the library code in your own systems, subject to its notice and attribution conditions.
  • Patent terms: The license includes an express patent grant from contributors, which legal teams usually review alongside the copyright terms.
  • Maintenance commitments: The license says nothing about release cadence, security fixes or who answers a vulnerability report, so confirm those with the maintainer.
  • Bundled dependencies: Each dependency that installs with the library keeps its own license, and your software bill of materials should list them.
  • Models and services: The license does not cover the LLM you connect to the guardrail, or any hosted endpoint that runs the library for you.

For NeMo Guardrails, the license text is in the repository's LICENSE.md file, which is the natural starting point for your legal review.

What drives the running cost of each library

Neither library has a license fee, so the running cost comes from the model calls your checks make, the engineers who write and test policies, and the upgrades you take over time. Each card below names one cost component, who pays for it, whether it is one-time or recurring, and what to ask for in a quote.

Model calls made by checks

Some NeMo Guardrails rails call an LLM or a classifier model, and Guardrails AI validators can call external models or services depending on the validator chosen from Guardrails Hub. Each of those calls adds compute or API spend on every request, so the cost recurs with traffic. Ask which rails and validators in your planned configuration make model calls, whether they run self-hosted or through a paid API, and how many calls one user request triggers.

NeMo Guardrails docs

Engineering time to write policies

Colang policies for dialog and topic rails are written and reviewed by engineers who learn the language and its flow model, and Guardrails AI guards require picking, configuring and chaining validators. This is mostly one-time setup, but it recurs whenever business rules change. Ask the implementer to estimate the number of policies in scope, who writes them after go-live, and whether the quote covers knowledge transfer to your own team.

Policy test suites

A policy that blocks a topic or a validator that flags a pattern must be tested against both attacks and legitimate user traffic to avoid false positives. Building that suite is a one-time cost, while keeping it current with new attack patterns and product changes recurs. Ask whether the quote includes a regression suite that runs in CI, who owns its maintenance, and how false positive results are reviewed.

Upgrades across breaking releases

NeMo Guardrails 0.25.0 deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0, so teams on current configurations will need a migration. Guardrails AI releases also change validator and API behavior between versions. Upgrade effort recurs with every major change, so ask who performs migrations, how regression testing is handled, and whether upgrades are priced as a retainer or per release.

NeMo Guardrails releases

Hosting and operations

Both libraries run inside your own services or as a self-hosted server, so you pay for the containers, logs and on-call coverage that keep them running. NVIDIA has retired the NeMo Guardrails microservice, so existing deployments built on it carry a migration cost that is not optional. Ask which deployment path the quote assumes, who maintains the container image, and what happens if the chosen server path changes.

Support options and retainers

Both projects are open source, so vendor support is not included by default. Support is a separate purchase, either from the project's maintainers or from an implementation partner, and DeployOpen offers ongoing support, upgrades and continuous testing as retainers. Ask what response coverage the quote includes, whether it is fixed-scope or recurring, and what is excluded from the retainer.

How to move policies from one library to the other

The sequence turns rules written for one guardrail library into equivalent rails or validators in the other, and ends with a regression run that shows the same attacks are still blocked before traffic moves.

  1. Inventory every existing rule and its purpose

    Export every live policy from the current library, including blocked topics, refusal messages, PII patterns, output format checks and any allow lists. Record who owns each rule and which application route or model endpoint it guards. Done when every rule appears on one list with an owner, a stated intent and the environment it runs in, and nothing is enforced only by code no one has read recently.

  2. Map each rule to a rail or validator

    For each inventory item, decide whether the target library expresses it as an input, dialog, output, retrieval or execution rail in NeMo Guardrails, or as an input or output guard built from a Guardrails Hub validator or a custom validator in Guardrails AI. Mark rules with no clean equivalent as gaps needing a design decision. Done when every rule has a target mechanism or a documented gap, reviewed by the security owner and the application team.

  3. Carry over the risk list and policy intent

    Keep the risk register, the statement of what each control must block, and the reasons behind exceptions. These documents do not depend on either library and become the acceptance criteria for the rebuilt controls. Done when the risk list is signed off as library-neutral, so reviewers can judge the new controls against the same requirements as the old ones.

  4. Rebuild dialog flows or validator chains

    Write the new controls in the target library. In NeMo Guardrails, this means Colang flows for dialog and topic rails and Python actions for execution rails, with configuration kept in the same folder structure the server loads. In Guardrails AI, it means installing the chosen validators, chaining them into guards and defining Pydantic models for any structured output. Done when the new configuration loads without errors in a development environment and each rule has a matching control in code.

  5. Carry over test cases and build a fixed attack set

    Reuse the existing test prompts, expected refusals and benign examples that prove legitimate traffic still passes. Add a fixed set of prompt injection, jailbreak, data leakage and off-topic attacks that the team agrees to keep as a stable baseline. Store the set in version control with expected outcomes. Done when the set covers every risk on the register and each case has a recorded expected result.

  6. Rerun the attack and regression set against both versions

    Run the fixed set against the old and new configurations under the same model and settings. Compare blocks, false positives and response content case by case, and record latency for each path because a dialog rail and a validator chain add different overhead. Investigate every case where the new control allows what the old one blocked, and every benign case that is newly refused. Done when no unexplained regressions remain and the differences are written up for sign-off.

  7. Cut over and keep the old policy for rollback

    Switch traffic to the new library in a controlled change, keeping the previous configuration deployable until the new setup has run in production without the regressions found earlier. Monitor blocks and errors after the change and keep the regression set running in CI so future policy edits are tested against the same cases. Done when the change record shows the test results, the rollback path was exercised, and the old library is removed from the request path.

Where guardrail projects usually run long

Most overruns on these projects come from policy work, not installation. NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, so confirm your base image and dependency pins against that range before anyone writes a rail. Guardrails AI installs its core through pip, but each validator from Guardrails Hub is a separate install, so the dependency list grows with every guard you add. Ask your platform team to pin both libraries and their validators in the same lockfile and to rebuild the server image on every change. Then confirm the Python version your chosen runtime supports, since that check is easy to skip and expensive to find late.

The learning curve is where NeMo Guardrails teams usually lose time. Dialog and topic rails are written in Colang, a language your security engineers will need to read, review and test, and the team must agree who owns those files. Guardrails AI shifts the effort toward validator selection and tuning: each validator has thresholds, and a regex or toxicity check that looks correct on a sample set can flood support queues with false positives in production. Plan a labeled test set of benign and hostile prompts, record the false positive rate per rail or validator, and set a review step before any threshold change ships.

Audit integration is the last cost teams underestimate. Both libraries sit in the request path, so the question is how each request carries the caller's identity from your SSO into the guardrail decision and then into your log pipeline. Confirm with your identity team how the server or service receives user context, which fields your SIEM needs for each block or allow decision, and where logs of rejected prompts are stored and for how long. Neither product should be assumed to provide this complete. Ask DeployOpen or your internal team to write the logging contract as part of the written scope, because retrofitting it after go-live is the most common reason these projects extend.

Questions buyers ask before choosing or hiring help

Which guardrail library should a regulated chatbot team choose?

Choose NeMo Guardrails when the main risk is conversation behavior, such as off-topic answers, unauthorized dialog paths or unsafe tool calls, and you want those rules written as reviewable Colang flows. Choose Guardrails AI when the main risk is content in and out of the model, such as PII, toxicity or malformed output, and you want checks from Guardrails Hub plus responses forced into a Pydantic schema. Many regulated chatbots need both kinds of control, so list the risks you must block first, then test each library against those cases. Confirm that the chosen library covers your required logging and access controls in your own environment, since the libraries do not provide those on their own.

What does a guardrail implementation cost in effort, and what drives it?

Both libraries are Apache-2.0, so the license is not the cost. You pay for engineering time to write and test policies, install and configure validators or dialog rails, connect the guardrail layer to your model endpoints, build CI test suites, and produce evidence for reviewers. Effort rises with the number of risk categories, the number of intents and tools, the languages you support, the latency budget, and how much audit logging and access control you must prove. One-time work covers the first build and security review. Recurring work covers policy updates, validator upgrades and regression tests after each library release. Ask any partner to size effort from a written list of risks and endpoints.

Can an internal team run NeMo Guardrails or Guardrails AI without outside help?

Yes, a team with Python engineers can run either library, but it needs a named owner for policies, tests and upgrades. NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, and its LLMRails class is deprecated in favor of Guardrails. Guardrails AI validators are installed separately from Guardrails Hub, so each one needs version tracking and review. Guardrails AI's quickstart also asks whether to enable anonymous metrics reporting when you run guardrails configure, which your security team should answer deliberately. Outside help is often most useful for the first build, the threat-based test set and the hardening and evidence work that a security review will request.

How long does a migration between the two libraries take, and what does it depend on?

No migration duration is published for moving between these libraries, so estimate it from an inventory of your current setup. The work depends on how many rails or validators you have, whether your code uses the LLMRails class that NeMo Guardrails 0.25.0 deprecates (removal is planned no earlier than 0.27.0), whether your Colang files use version 2 syntax, and how your Pydantic output models map to dialog and output rules. NVIDIA publishes a Colang 2 migration guide and a 0.25 migration guide. Ask for the migration to be scoped as a written inventory, a test comparison of both versions and a rollout plan before any timeline is agreed.

Is NeMo Guardrails still maintained after the NeMo microservice sunset?

The open-source library is still maintained. NeMo Guardrails is Apache-2.0 licensed, its repository is NVIDIA-NeMo/Guardrails, and version 0.25.0 was published on November 19, 2026, after 0.24.1 on September 16, 2026. The sunset applies to the NeMo microservices container on NGC, which NVIDIA says has no new releases and is no longer supported as of October 1, 2026. NVIDIA's archived documentation says new development has moved to NeMo Platform, now the NeMo Helix repository, where Guardrails runs as an inference gateway plugin. Existing microservice users should contact their NVIDIA account team. Check which path your deployment depends on before you commit.

What should a services partner put in a quote for guardrails work?

Ask for a fixed scope in writing before work starts. The quote should name:

  • The risks to block, with the test cases that prove each one
  • The applications, model endpoints and rail types in scope (input, dialog, output, retrieval or execution)
  • Each validator or model dependency, its license and its version
  • Integration points, CI test coverage, audit logging and access control
  • Deployment target, including your cloud, data center or air-gapped network
  • Handover documents, retest and acceptance criteria
  • Exclusions, and which items are one-time and which are retainers

DeployOpen works from fixed-scope engagements with scope, deliverables and timelines agreed in writing, and a quote follows from that scope. Ongoing upgrades and continuous testing are available as retainers.

How DeployOpen helps choose, implement or migrate guardrails

DeployOpen plans, implements, customizes, integrates, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, so the choice between NeMo Guardrails and Guardrails AI is tested against your actual risks and deployment. We work from a written scope and can prepare the controls and evidence your security and compliance teams will review.

How we scope

  • We confirm which risks the guardrails must block, such as prompt injection, data leakage or off-topic dialog.
  • We map where rails or validators sit in your request path and what latency budget your application can accept.
  • We agree deliverables, timelines and responsibilities in writing before any work begins, as engagements are fixed-scope.

How we build

  • We implement the chosen library, whether Colang dialog and topic rails or Guardrails Hub validators, against your model endpoints.
  • We integrate the guardrail server with your SSO, access control, audit logging and existing model gateways.
  • We test the configured guardrails against prompt injection and output checks, then fix gaps and retest before handover.

How we hand over

  • We document policy files, validator chains, configuration keys and the Python version and dependencies each one needs.
  • We deliver runbooks for updating Colang or validator policies, including how a change is reviewed and rolled back.
  • We provide evidence packs that help your security and compliance teams review the setup, without issuing any audit or certification.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, so library releases can be reviewed on your schedule.
  • We can retest policies after a library upgrade or a change to the underlying model, and report any regressions found.
  • Ask for a quote that lists scope, deliverables, retainer terms and what your own team must provide during the engagement.

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.