How Guardrails AI validators run as NeMo Guardrails rails
A team that already runs NeMo Guardrails and wants specific checks from Guardrails AI or the Guardrails Hub can add them without replacing its existing rails. NeMo Guardrails supports Guardrails AI validators for input and output validation. The supported method is to install the guardrails-ai package, install any Hub validators the configuration needs, and then reference those validators from the rails in the configuration. Validators are used as input and output checks, so they run at the boundaries of the conversation while the rest of the NeMo Guardrails configuration stays in place. Both projects are licensed under Apache-2.0, and NeMo Guardrails 0.25.0 is the current release, published on November 19, 2026.
Before building, confirm three things in your own environment. First, check that your Python version is one NeMo Guardrails 0.25.0 supports (3.11, 3.12 or 3.13). Second, list each Hub validator you need and confirm it installs cleanly in the same environment or container image that runs your rails, since each validator is a separate install. Third, confirm how the validator is referenced in the NeMo Guardrails configuration, using the GuardrailsAI integration documentation as the reference for the exact syntax for your release, because the integration details can change between versions.
The key decision is ownership. The team that maintains the NeMo Guardrails configuration will also own the validator versions, and an update to either package can change how a check behaves at the input or output boundary. Pin the guardrails-ai and Hub validator versions in your build, and record them alongside the NeMo Guardrails version so a later review can reproduce the exact check. Ask your security or compliance reviewers which validator outcomes must block a response and which should only be logged, because that choice determines how the validator is wired into each rail.
What you need before installing Guardrails AI validators
Four things decide whether the install goes smoothly: the Python runtime, the guardrails-ai package and its validators, network access for Hub downloads, and the folder layout NeMo Guardrails reads at startup. Check each one in the environment where the rails will run, not only on a developer laptop.
Python runtime for NeMo Guardrails
NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13. Confirm the interpreter in the same image or virtual environment that will run the rails, because a version mismatch is the simplest reason an install fails. If your platform team pins an older base image, raise that before the build starts, since the rails and the validators must share one runtime.
- Supported Python
- 3.11 to 3.13
The guardrails-ai package
Guardrails AI is installed separately with pip install guardrails-ai, and the NeMo Guardrails integration relies on it. Pin the version your team tests against, and record it in your lock file. Check the current release notes before upgrading, because the package moves on its own schedule from NeMo Guardrails.
- Latest release noted
- 0.11.0
Hub validator licenses and availability
Each validator you need is a separate package from Guardrails Hub, and each carries its own license and maintenance status. Confirm that every validator you plan to use is available, still maintained and licensed for your use case, and record the answers in your own environment. Do not assume that a validator listed in documentation is still published.
Guardrails AI on GitHubNetwork egress for validator downloads
Validator installs and some model-based validators need outbound access to package and model hosts during the build, and may need it at runtime. Ask your network team which hosts your build pipeline can reach, and plan a mirror or pre-built image for air-gapped or restricted networks. Confirm whether the Guardrails AI configuration prompt for anonymous metrics reporting is answered and enforced in your environment.
Configuration folder layout
NeMo Guardrails loads a configuration folder that holds config.yml, any Colang files and optional Python actions. Place the Guardrails AI rail definitions in that folder so that reviewers can see every input and output rail in one place. Keep the folder under version control, and agree on who approves changes before they reach a shared server.
Ownership and version tracking
Name one owner for the validator set and one for the NeMo Guardrails runtime, because the two packages release separately. Track both versions in the same change record. NeMo Guardrails 0.25.0 was published on November 19, 2026, and its predecessor 0.24.1 on September 16, 2026, so a team that upgrades one package should retest the combined pipeline.
How to configure a Guardrails AI validator as a rail
This sequence installs Guardrails AI and its Hub validators, registers them as input and output rails in a NeMo Guardrails configuration, and proves with known-bad and known-good prompts that each rail blocks and passes traffic as intended. The result is a tested configuration that can be versioned and rerun after upgrades.
Confirm the Python and NeMo Guardrails environment
The engineer creates a clean virtual environment on Python 3.11, 3.12 or 3.13, the versions NeMo Guardrails 0.25.0 supports, and installs the
nemoguardrailspackage at that release. Keeping both frameworks in one isolated environment makes later dependency conflicts easier to trace. The step is complete when the package imports cleanly and reports version 0.25.0 in the same interpreter that will run the application.Install the guardrails-ai package
In the same environment, the engineer runs
pip install guardrails-aiand thenguardrails configure. The configure step asks whether to enable anonymous metrics reporting, so the team should make that choice deliberately and record it in its security documentation. The step is complete whenguardrailsruns from the command line and a Python import of theguardrailspackage succeeds in the environment.Install each Guardrails Hub validator
Guardrails AI validators come from Guardrails Hub and are installed separately from the core package, so the engineer picks one validator per check (for example, toxic language, PII or regex matching) and installs each with the
guardrails hub installcommand. Record each validator name and version in the project's dependency file. The step is complete when a short script can construct a Guard that uses every chosen validator without an import error. Confirm the exact install syntax in the NeMo Guardrails GuardrailsAI integration documentation before scripting it.Register the validators in config.yml
The engineer adds the Guardrails AI validator actions to the
config.ymlfile, placing each one under the input or output rail list that matches its purpose: input checks for user prompts and output checks for model responses. Parameters such as thresholds and the on-fail behavior follow the integration's documented settings. The step is complete when the configuration folder loads through the Guardrails class without error. The Guardrails class replaces LLMRails, which NeMo Guardrails 0.25.0 deprecates.Write the Colang flows that call the validators
The engineer writes Colang flows that call each registered validator and define the bot response when a check fails, such as a refusal message that does not reveal the rule. Colang 1.0 is the default in NeMo Guardrails, so the team should use that syntax unless it has chosen Colang 2.x. The step is complete when the flows are referenced from
config.ymland the configuration still loads with no unresolved flow or action names.Send known-bad prompts to confirm blocking
The engineer loads the configuration and sends a set of prompts that the chosen validators should flag, such as a prompt containing a sample personal identifier or abusive language. Each request should return the configured refusal and should not reach the model. The step is complete when every known-bad prompt is blocked, and the logs show which input rail fired. Keep the prompts and expected outcomes in a file so the same test can be rerun later.
Send known-good prompts to confirm pass-through
The engineer sends ordinary, benign prompts through the same configuration and checks that the model answers normally without the refusal being triggered. The engineer also sends a model response that should fail the output validator, using a stub or a fixed test response, to confirm the output rail intercepts it. The step is complete when benign prompts pass unchanged, the test output is blocked, and any false positives are recorded for tuning.
Save the test set for upgrade regression
The engineer stores the known-bad and known-good prompts, the expected outcomes and the pinned validator versions in the project repository, and reruns them whenever NeMo Guardrails, Guardrails AI or a Hub validator changes. Both projects publish releases on their own schedules, so the team should confirm the release notes before upgrading. The step is complete when a single command reruns the full set and reports pass or fail for each prompt.
How a request passes through input rails, the model and output rails
A user message enters the application and reaches the NeMo Guardrails input rails, which call Guardrails AI validators before anything goes to the model. A block decision stops the request at that point and returns a refusal, while a pass decision forwards the message to the LLM provider across the trust boundary. The model's response then goes back through the output rails, where the same validator logic decides whether it is returned to the user. Check that every block path produces a defined response and is logged.
Request flow through NeMo Guardrails rails, Guardrails AI validators and the model.
Which checks belong in input rails, output rails and the application
Input rails run on user text before the main model is called, so they are the cheapest place to stop a request that should never reach the model. Checks for PII, jailbreak attempts and toxic language fit here because the goal is to block or mask the message before personal data is sent to a model provider or a prompt reaches the model. A blocked input also avoids the model call cost entirely, which is why this layer usually carries the checks that are fast and deterministic.
- PII on user text: Run detection before the prompt leaves your boundary, and decide whether the rail blocks the message or masks the value.
- Jailbreak and injection signals: Use the built-in NeMo Guardrails jailbreak and injection rails first, then add Hub validators only where they cover a gap your testing found.
- Toxicity on user input: Screen abusive language early so the conversation does not continue on a message your policy rejects.
- Regex and format checks: Lightweight pattern validators, such as those for account numbers or ticket codes, cost little and suit the input layer.
- Ordering: Place cheap checks first so expensive model-based checks run only on inputs that pass.
Before go-live, confirm which validators your configuration calls on input and what each one returns when it fails, so blocked and masked outcomes are logged the same way.
Output rails inspect what the model produced before the user sees it. This layer matters for content that the input layer cannot predict, such as a response that leaks personal data from retrieved documents, uses unsafe language, or breaks the format a downstream system expects. Structured output checks also belong here, because they validate the shape and content of the generated result rather than the question that produced it.
- Response content safety: Check generated text for toxic language, unsafe advice and personal data the model may reproduce.
- Structured output: Validate that a response matches the schema, field types and allowed values your downstream system requires.
- Grounding checks: Where answers must follow retrieved sources, use the output layer for fact-checking and hallucination detection rather than trusting the input filter.
- Latency cost: Each output validator runs after generation, so chained checks add to the time a user waits, and streaming behavior should be tested before you rely on it.
- Duplicate checks: A PII check on the input and again on the output may both be needed, but a second identical toxicity check usually adds cost without adding coverage.
Confirm how your chosen configuration handles a failed output, whether it returns a fallback message, re-asks the model, or blocks, and test each path.
Application code owns decisions that depend on who the user is and what the business allows, which no content validator can know. Authorization, record-level access, transaction limits and workflow rules are facts held in your systems, not properties of the text. Keeping these checks in code also keeps them under your normal review, testing and audit processes, instead of inside a rail configuration that few people read.
- Authorization: Confirm the user may access the record, tool or data source before the model is asked to act on it.
- Business rules: Enforce limits such as approval thresholds, eligible products or regional restrictions in the service that executes the action.
- Tool execution: Validate tool arguments against the permissions of the calling user, because a model response alone does not establish identity.
- Logging of decisions: Record authorization outcomes in your application logs so reviewers can trace a decision to a user and a time.
- Avoiding overlap: Do not reimplement a content check in application code just because it is convenient, since two places that disagree create hard-to-debug results.
Before build, map each control in your requirements to one owning layer, and ask your reviewers which evidence they will accept from each.
Some checks look the same in every layer. A Guardrails Hub validator for toxicity or PII may overlap with a built-in NeMo Guardrails rail that covers the same risk, and a validator may be redundant with a safety model you already run. Overlap is not always wrong: a second check can catch a different failure, but it should be a deliberate choice with a stated reason, not the result of two teams adding controls independently.
- Built-in versus Hub: Compare what each built-in rail and each Hub validator detects, using your own test set, before you run both.
- Latency budget: Measure end-to-end time with the full set of rails enabled, since each added check extends every request.
- Disagreement: When two checks give different verdicts on the same text, define which one wins and log both results.
- Maintenance: Each validator is a dependency with its own release cycle, so record versions and re-test after upgrades.
- Cost ownership: Hosted model calls made by safety checks are billed by their providers, and the platform team should track that spend per rail.
Ask for a written mapping of each control to one layer, with the reason any check runs twice and the test results that justify it.
How validator outcomes map to NeMo Guardrails rail decisions
This table maps each validator result (pass, fail, error) to the rail it runs on, the field it reads, and the team that should own the response. Read each row as a design decision to confirm before go-live, since the response is set in your configuration and actions rather than by the validator alone. The main takeaway is that a validator only reports a result, so the block, refuse, mask or log behavior has to be defined explicitly for each rail.
| Validator result | Rail and field it reads | Response to configure | Decision owner |
|---|---|---|---|
| Pass on a PII validator | Input rail, user message | Allow the message to continue to the model unchanged | Application owner with privacy sign-off |
| Fail on a toxic language validator | Input rail, user message | Block the turn and return a fixed refusal message | Product owner with trust and safety |
| Fail on a regex validator for account numbers | Output rail, model response | Mask the matched value before the response reaches the user | Security or privacy team |
| Fail on a jailbreak validator | Input rail, user message | Block the turn and log the event for review | Security operations |
| Error from a Hub validator (for example, a missing model or failed call) | Input or output rail, same field as the check | Choose fail-closed (block) or fail-open (log and allow) per validator, and confirm the choice in writing | Risk owner, with engineering documenting the setting |
| Fail on a content safety validator for model output | Output rail, model response | Replace the response with a fixed message and log the original for investigation | Product owner with legal review of the message text |
| Fail on a validator applied to a tool call result | Execution or output rail, tool result field | Block the result from reaching the model and log the call (confirm the tool rail supports this in your version) | Platform engineering with the owner of the tool |
| Any result that must be retained for audit | Logging in the rail action, all fields | Log validator name, version, outcome and rail, with raw content only where policy allows | Compliance lead, with a retention period set by policy |
Securing validator installs, secrets and logs
Validators from Guardrails Hub are third-party code that runs inside your guardrail path, and the guard sits next to model keys and user text. The cards below cover what to pin, review, keep out of files, configure at install time and log, so the validator layer does not add a new weak point to the application.
Pin guardrails-ai and Hub validator versions
Pin the guardrails-ai package and every Hub validator to exact versions in your lock file, not open ranges. Guardrails AI publishes frequent releases, including v0.11.0 on August 14, 2026, so an unpinned install can change validator behavior between a tested build and a production build. Record the NeMo Guardrails version alongside them, and retest the rails whenever any of these versions move.
Review third-party validator code before use
Hub validators are installed from a registry and may run arbitrary Python when loaded. Before the first install, read the validator source, its declared dependencies and any network calls it makes, and confirm the license is compatible with your use. Ask who maintains each validator and whether it has been updated recently. Keep approved validators in an internal registry or mirror so new installs go through the same review.
Keep model and API keys out of config files
Guardrail configuration folders with a config.yml file are often committed to version control and copied between environments. Keep provider keys, Hub tokens and any validator credentials in environment variables or a secrets manager that injects them at runtime. Check the repository history for keys that were committed earlier, and rotate any that appear in it. Confirm that server images and logs do not print the environment.
Decide on anonymous metrics during configure
The Guardrails AI quickstart says guardrails configure asks whether to enable anonymous metrics reporting. Make this an explicit decision in your installation runbook rather than accepting the default prompt during an automated build. Confirm what the setting reports in your version, check whether your network policy allows the outbound call, and record the answer so auditors and operators can see how each environment was set up.
Control what validator inputs get logged
Validators receive raw user prompts and model outputs, which may contain personal data, credentials or confidential text. Trace and log settings in NeMo Guardrails and in Guardrails AI can each record that content. Decide which fields are logged, mask or hash sensitive values before they reach logs, set retention limits on the log store, and test a blocked request end to end to confirm that the stored record contains only what the policy allows.
Why Guardrails AI validators fail inside NeMo Guardrails
This table lists the failures teams most often hit when wiring Guardrails AI validators into NeMo Guardrails rails, with the cause and the fix for each. Read it as a checklist to run through before blaming the model or the validator itself. The main takeaway is that most failures trace to installation, registration or flow wiring, not to the validator logic.
| Failure | Cause | Fix |
|---|---|---|
| Hub validator missing at runtime | The guardrails-ai package is installed but the specific Hub validator was never installed in the environment that runs the rails | Install each Hub validator the config references, then restart the process or container so it loads; confirm the exact install commands in the Guardrails Hub documentation |
| Unsupported Python version | NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, and the validator environment may run an older or newer interpreter | Pin the runtime to a supported Python version in the virtual environment or base image and verify it before installing packages |
| Validator not registered in config.yml | The validator is installed but the rail definition in config.yml does not reference it, so the rail silently passes traffic | Add the validator to the Guardrails AI rail entry in config.yml, then send a known-bad test input and confirm the rail fires |
| Colang flow never calls the rail | The Colang flow does not invoke the input or output rail, or the flow name does not match the rail it should trigger | Trace the flow order in your Colang files, confirm the rail is invoked on every path, and test each path with a sample message |
| False positives on domain text | Generic validators such as toxicity or PII checks flag legitimate terms in your domain, for example medical or financial vocabulary | Tune validator thresholds or on-fail actions, move domain-specific checks to a narrower validator, and add a regression set of approved domain messages |
| Added latency on every turn | Each validator call runs in the request path, and chained validators or remote calls add time to every user turn | Limit validators to checks that must run per turn, order cheap checks first, and measure per-rail latency before adding more |
How to test validator rails before and after release
A validator rail is only as trustworthy as the test set that proves it blocks what it should and passes what it should. Before a Guardrails AI validator goes into an input or output rail, build a labeled test set of prompts and model responses: a list of inputs that must be blocked (for example, text that should trigger the PII or toxic language validator), a list that must pass, and borderline cases that your policy owners have agreed on. Store the set in version control next to the config.yml and Colang files it covers, so that every change to a validator, threshold or rail ordering is measured against the same expectations. Confirm with your security and product owners who owns the labels, because a test set written by the team that wrote the rail will tend to confirm the rail's existing behavior.
Run the full set on every configuration change, not only when the validator itself changes. A new Hub validator, a reordered rail, a changed on-failure action or a different model behind the rail can each shift the outcome, so record pass and fail counts per run and treat any new allowed prompt that is blocked as a regression. Pin the guardrails-ai version and each Hub validator version in your dependency lock, then read the Guardrails AI releases before every upgrade. Rerun the test set on the candidate version in a staging environment and compare results against the baseline. Track which validator versions passed each release, so an auditor or incident responder can see what was running on a given date.
Check failure behavior as deliberately as detection. Validator code can raise errors, time out or receive a model response it cannot parse, and the rail must then fail closed or follow a documented policy rather than silently passing the message. Add test cases that force each failure path, including an unreachable validation service, a malformed input and an exception inside a custom validator, and confirm the user receives the configured refusal and the event is logged. Keep the coverage of rail-level and dialog-level behavior, monitoring of blocked traffic and per-rail benchmarks in the sibling NeMo Guardrails testing and evaluation and monitoring and observability pages, since this section covers only the validator-specific checks.
Questions teams ask before running Guardrails AI validators
What drives the cost of running Guardrails AI validators inside NeMo Guardrails?
The cost is mostly the engineering time to design the rail layout, wire each validator into an input or output rail, and test the combined behavior. Cost rises with the number of validators, the number of rails and model endpoints involved, whether Guardrails Hub validators need custom work, and how much evidence the security or compliance team wants. Installation itself is small: the guardrails-ai package is installed with pip after which any needed Hub validators are added separately. Ask any provider for a quote built from a written list of validators, rail points, environments and test cases, and ask which items are one-time setup and which recur, such as validator upgrades and retesting. DeployOpen does not publish a price list, and a quote follows from the written scope.
How long does a first integration take?
Duration depends on scope: how many validators are in play, whether they sit on input, output or both sides, whether the application already runs NeMo Guardrails, and how many environments must be covered. A narrow setup with one or two validators on a single application is much shorter than a layered design across several applications with custom validators. The supplied facts do not give a typical duration, so ask any provider for a timeline tied to a written scope and a named list of deliverables. Also confirm your Python version: NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, and that check can delay a start if the runtime is older.
What does our team need to supply before the work starts?
Plan to supply four things: a list of the checks you want (for example PII detection, toxic language filtering or jailbreak detection), representative test inputs and outputs including known bad cases, a staging environment where the NeMo Guardrails configuration and the model endpoints can run, and named owners for security sign-off. Test data should include real-world edge cases that your application actually sees, handled under your own data rules. If you run the server, confirm the hosting target and access to the model endpoints and secrets. Confirm each of these with your own security and data governance teams before the scope is signed.
Can our in-house team build this without a partner?
Yes, if your team already knows Python, the NeMo Guardrails configuration model (config.yml and Colang files) and the validators you plan to use. The integration is a set of configuration and action code that your engineers can write, but the work usually includes choosing which checks belong in which layer, testing false positives and negatives, and producing evidence for reviewers. Teams without that experience often underestimate the testing. Assess your team against that list, and if you bring in a partner, ask them to document the design so your engineers can maintain it afterward.
What changes when a Guardrails AI validator version updates?
A validator update can change what gets flagged, how thresholds behave and which dependencies are needed, so each update should go through the same test set before it reaches production. Guardrails AI published v0.11.0 on August 14, 2026, after v0.10.2 on June 4 and v0.10.0 on April 3, 2026, per the project's GitHub releases page, so the release cadence is active. Pin versions in your dependency files, read the release notes, rerun your evaluation suite and record the results. NeMo Guardrails also changes: 0.25.0 was published on November 19, 2026, after 0.24.1 on September 16, 2026, and it deprecates the LLMRails class in favor of Guardrails. Plan upgrades for both libraries together.
Which checks should go in input rails and which in output rails?
Input rails should screen what users send before the model sees it, such as jailbreak attempts, injection payloads and personal data you do not want forwarded to a model provider. Output rails should check what the model returns, such as toxic language, leaked personal data or content that breaks your policy. Some checks belong on both sides, and PII is a common example when prompts and responses are both logged. Decide placement by asking where the risk enters, what a block costs the user, and which logs your auditors will want to see. Validators that need the model response, such as checks on generated structured data, only make sense on the output side.
Does DeployOpen certify that these validators make our application compliant?
No. DeployOpen plans, implements, tests and documents the controls, and prepares evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those determinations. What DeployOpen can deliver is a configuration you can explain, test results for the validators in your environment, and logs your reviewers can inspect. Ask any provider to state in writing which deliverables are controls and evidence and which are assessments made by others.
How DeployOpen works on this
DeployOpen scopes Guardrails AI validators inside NeMo Guardrails as a written, fixed-scope engagement, starting with which checks belong in input rails and which in output rails. The work then covers installing and configuring validators, testing them against your own traffic, and handing over a configuration your team can run and change.
How we scope
- We list each check you want, then assign it to an input rail, an output rail or another layer before any code is written.
- The written scope names the validators, Hub packages, hosting location and the Python environment the integration will run in.
- We confirm which Guardrails AI and NeMo Guardrails versions your platform team will pin before the build starts.
How we build
- We install guardrails-ai and the Hub validators you approve, then wire each one into the NeMo Guardrails configuration as a rail.
- We set validator order and failure behavior so blocked inputs and outputs return the response your application expects.
- We write custom validators only where the approved scope requires them, and keep them in your repository under your review process.
How we hand over
- You receive the configuration files, Python actions, validator list and install steps as documentation your team can rebuild from.
- We record test cases for each rail, including prompts that should pass and prompts that should be blocked, so results can be repeated.
- We walk your engineers through the configuration and confirm who owns validator updates and Hub package changes after handover.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, including reviews when Guardrails AI or NeMo Guardrails publishes a new release.
- Retesting after a version change checks whether validator behavior, latency and blocked-request logs still match the approved scope.
- Ask any provider to confirm in writing how validator licenses, Hub package maintenance and telemetry settings apply in your environment.

