NemoGuard JailbreakDetect NIM with NeMo Guardrails

Learn how to add NVIDIA's embedding-based jailbreak classifier to NeMo Guardrails, choose between hosted and self-hosted NIM, test it and monitor it, since outages fail open.

On this page

Adding NemoGuard JailbreakDetect to NeMo Guardrails: what it does and when to use it

If your LLM application needs a jailbreak check on user input, the NemoGuard JailbreakDetect NIM is one option to evaluate inside NeMo Guardrails. It is an NVIDIA inference microservice that runs an embedding-based classifier, and a jailbreak rail in your configuration calls it on each incoming prompt before the model sees that prompt. The classifier judges the meaning of the text as a whole, which makes it a different kind of control from the perplexity heuristics that NeMo Guardrails also offers, and those heuristics score how unusual the text looks. Choose the NIM when you want a trained classifier on the input path and can accept an extra model call for each request. Keep the heuristics in the design when you need a check that calls no external model, or when you want two independent signals to compare against each other.

The NIM dependency needs planning before you commit. NeMo Guardrails is licensed under Apache 2.0, so the library itself is free to use and modify. NVIDIA has, however, sunset the NeMo Guardrails microservice as of October 1, 2026, with no new releases and no continued support for its container. The archived NeMo Microservices documentation says new development has moved to NeMo Platform and asks existing users to contact their NVIDIA account team. Before you build on the JailbreakDetect NIM, confirm with NVIDIA which deployment path covers it, which license terms and support apply to the version you will run, and whether the endpoint will remain available for the service life you plan. Treat that answer as a gating item in the design, and record it in your architecture decision log.

Plan the rollout as a short sequence of checks. Pin the NeMo Guardrails version you test, since the current release, 0.25.0, was published on 19 November 2026 and requires Python 3.11, 3.12 or 3.13, and confirm that your runtime matches. Run DAN-style and other jailbreak prompts against the input rail in a staging environment, record which ones are blocked, and keep that set as a regression suite. Confirm how your integration handles a failed or timed-out classifier call, because that behavior determines whether the request is blocked or passed through. Finally, ask your NVIDIA account team for the latency, capacity and availability information that applies to your deployment, since this guide does not state those figures.

Hosted versus self-hosted NemoGuard NIM: which fits your environment

In an internet-connected cloud setup, a hosted NIM endpoint is the lowest-effort option to evaluate. The application sends the text it wants checked to a hosted endpoint, the detector returns a verdict, and your team does not manage GPU capacity, container images or model updates. The trade-off is that prompt text leaves your network boundary, so the data path must be reviewed against your data classification rules before any production traffic goes through it.

  • Data path: Confirm which prompt fields are sent, whether they are logged by the provider and for how long.
  • Network egress: Outbound HTTPS from your application or guardrails server to the endpoint must be allowed and monitored.
  • Operations: NVIDIA or its hosting partner typically runs the GPUs; your team still owns the calling code, timeouts and retries.
  • Availability: Plan for the case where the endpoint is unreachable, since the outage behavior is covered in the monitoring section of this page.
  • Licensing: Check the NVIDIA terms that apply to hosted use, including any API key and usage limits.

Before choosing this option, ask NVIDIA in writing where hosted requests are processed and what retention applies.

Configuration options and when each one fits

This table compares where the JailbreakDetect classifier runs, how NeMo Guardrails calls it, and which other detectors you pair with it. Read each row for the condition that favors it and the trade-off you accept. Most decisions turn on where prompts may travel and who operates the GPU capacity, so confirm those two points before choosing.

OptionWhen it fitsTrade-off
Hosted classifier endpointPrototypes, or teams without GPU capacity that can send prompts outside their environmentPrompts leave your network. Confirm data handling, regional availability and rate limits with the provider first.
Self-hosted NIMRegulated data, data residency requirements or air-gapped networksYour team runs the GPUs, image updates and health monitoring. Confirm supported hardware and versions with NVIDIA.
NeMo Guardrails serverSeveral applications share one policy set, or callers are not written in PythonAdds a service to secure, scale and monitor. The configuration folder becomes the unit of change.
Python API in-processOne Python application that needs tight control over startup and input handlingGuardrail upgrades follow application releases. NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13.
Retired NeMo microservice containerNot a fit for new workNVIDIA sunset the NeMo microservices as of October 1, 2026, with no new releases. Plan a move to a supported path.
Classifier aloneEarly coverage of well-known DAN-style jailbreak promptsMisses injection payloads that do not look like jailbreaks. Test with your own attack set before relying on it.
Classifier with heuristicsLayering a second detection method against the same inputAdds latency and possible false positives. Tune thresholds against your own traffic.
Classifier with YARA rulesCode, SQL or XSS payloads in tool calls, retrieved content or agent outputRules match syntax patterns, not intent. Pair them with the classifier rather than expecting one to cover the other.

Setting up the NemoGuard JailbreakDetect rail step by step

This sequence takes a host from a clean Python environment to a NeMo Guardrails configuration that screens user input for jailbreak attempts through a NemoGuard JailbreakDetect NIM. Each step ends with a check, so the team knows the rail works before any application depends on it.

  1. Confirm the Python version and isolate the environment

    The platform or application engineer confirms that the host runs Python 3.11, 3.12 or 3.13, the versions NeMo Guardrails 0.25.0 supports, and creates a dedicated virtual environment for the guardrails service. Keeping it separate from the application's own dependencies makes later upgrades and rollbacks easier to manage. Run python --version inside the new environment and confirm the output reports 3.11, 3.12 or 3.13. If it does not, install a supported interpreter before continuing.

  2. Install the pinned nemoguardrails release

    The engineer installs nemoguardrails from PyPI at version 0.25.0, the current release, and pins that version in the project's dependency file so every environment runs the same code. Pinning matters because the 0.25 release deprecates the LLMRails class in favor of Guardrails, and NVIDIA publishes a migration guide for it. Run pip install nemoguardrails==0.25.0, then run pip show nemoguardrails and confirm the version is 0.25.0. The check passes when python -c "import nemoguardrails" completes without error.

  3. Choose a hosted or self-hosted NIM

    The architect decides where the JailbreakDetect NIM runs. A hosted endpoint means the model runs outside your infrastructure, so user input leaves your network for classification. A self-hosted NIM runs in your cloud account, data center or air-gapped network, which keeps prompts under your control but makes your team responsible for GPU capacity, updates and availability. Ask NVIDIA or your account team which NIM images, license terms and hardware requirements apply. Record the decision, its owner and the data handling review that supports it.

  4. Set NIM credentials through environment variables

    The platform engineer places the API key or endpoint address for the NIM in environment variables or in the secrets manager that feeds the runtime, and keeps them out of config.yml and the Colang files. Configuration files are often committed to version control and copied between environments, so credentials stored there tend to spread. Confirm the exact variable names in the NeMo Guardrails documentation for the NIM integration. The check: start the service with the variables loaded and confirm the startup log reports the endpoint without printing the key.

  5. Write config.yml with the jailbreak input rail

    The engineer creates a configuration folder with a config.yml that enables the jailbreak detection input rail and points to the NIM model, using the keys and flow names in the NeMo Guardrails documentation. The file holds model settings and flow names only. Attack examples and test prompts stay in version-controlled test files, so reviewers can audit the rail definition without copying attack text into configuration. Load the folder with the Python API or the guardrails server, and confirm startup completes with the input rail listed as active.

  6. Verify the rail blocks DAN-style test prompts

    The security engineer runs a fixed set of DAN-style jailbreak prompts from a test file through the configured application, using the Python API or the server endpoint. Each prompt should return the rail's refusal and should not reach the application's model. Record the request, the response and the flow that fired, since that log is the evidence the rail is doing its job. Repeat the run after any change to the configuration, the NIM version or the nemoguardrails release. The check passes when every prompt in the set is blocked.

  7. Confirm benign prompts pass and test the outage path

    The engineer sends a set of ordinary business questions through the same application to confirm they reach the model and return normal answers, because an overly broad rail blocks legitimate work. Then, in a test environment only, the engineer makes the NIM endpoint unreachable and sends a test prompt to see what the application returns. Whether the request is allowed or refused depends on how the integration handles errors, so review the jailbreak detector outage guidance in this topic group before go-live. The check: benign prompts succeed, and the team has a written record of behavior during the outage.

Testing the jailbreak rail with DAN-style prompts and a benign baseline

A jailbreak rail is only as good as the test set that measures it, so build two sets before you enable it: one of DAN-style and role-play jailbreak prompts that should be blocked, and one of ordinary business traffic that should pass. The first set measures what the detector catches. The second measures over-blocking, which is the cost your users feel every day. Include multi-turn attempts, prompts in the languages your users write in, and requests that legitimately mention roles, personas or fiction, since those are where false positives tend to appear. The prompt examples in this section are illustrative; the team should write the actual set from its own threat model and its own logged traffic, with anonymized samples that reflect real user phrasing.

Run both sets through the same configuration you will deploy, including the NemoGuard JailbreakDetect NIM endpoint, the config.yml rail settings and any custom actions, and record for every prompt the expected outcome, the actual outcome, the rail name, the detector score returned and the response latency. Store results with the configuration version, model or NIM image tag, and NeMo Guardrails version so a later run can be compared like for like. Run the suites before every change to prompts, thresholds, Colang flows, the NIM version or the NeMo Guardrails version, and treat any new block in the benign set or any new pass in the jailbreak set as a regression to explain before release. Confirm the NIM version and its supported inputs with NVIDIA's documentation before you pin it.

Treat the results as evidence for the owning team's review, not as proof of protection. A passing jailbreak suite shows that these known phrasings were caught, not that unknown ones will be. Assign a named owner for the test sets, a reviewer who signs off on threshold changes, and a schedule for refreshing the attack examples from new public research and your own red team findings. Pair these tests with the detector outage monitoring described elsewhere on this page, because a suite that runs only in CI says nothing about what happens when the NIM is unreachable in production.

Security and operational risks of relying on the detector

A jailbreak classifier is one control among several, and its failures are quiet unless someone watches for them. The cards below cover the risks that follow from running NemoGuard JailbreakDetect NIM, from fail-open behavior to the configuration and credentials around it.

Fail-open behavior on outage

If the NIM endpoint times out, returns errors or becomes unreachable, the request may pass the input rail without any jailbreak check. Confirm how your integration handles a classifier error before go-live, including whether it blocks, allows or logs the request. Test this by stopping the endpoint in a staging environment and observing what reaches the model. The fail-open page covers the detailed patterns and fallback rails.

NeMo Guardrails docs

Detector is not the permission boundary

A classifier estimates whether an input looks like a jailbreak. It does not limit what the model or its tools can do. Tool scopes, database permissions, data access and approval steps for sensitive actions must hold even when the detector misses a prompt. Treat the detector as a filter that reduces risk, and keep the authorization decisions in the application and its identity layer.

Prompt and content logging exposure

Tracing and debugging often record the raw prompts that the classifier scored, including attack text and any personal or confidential data inside it. Decide which fields are logged, who can read them and how long they are kept. Check whether your observability stack stores request bodies by default, and mask or drop content before it reaches shared dashboards.

Credentials for hosted endpoints

A hosted NIM call sends traffic to a provider endpoint and requires an API key or token. Store that credential in a secrets manager, scope it to the detector only, and rotate it on a schedule your security team sets. Confirm which environments hold the key, since a leaked key in a build pipeline or log line gives an attacker a way to exhaust your quota or inspect traffic patterns.

Supply chain and version pinning

The library, the NIM container image and the model weights each change on their own schedule. Pin the NeMo Guardrails version, the container digest and the model tag, and record them in your deployment manifests. Review release notes before any upgrade, because a model change can shift detection results on your traffic. Confirm the release you pin is still supported, since NVIDIA has retired the NeMo Guardrails microservice.

Current library release
0.25.0
Guardrails releases

Change control for configuration

Rail settings, thresholds, Colang flows and the list of enabled detectors all change the protection a user receives. Keep these files in version control, require review for changes, and run a fixed set of DAN-style and benign test prompts after every change. Record who approved each change so that an auditor or incident responder can reconstruct what protection was active on a given date.

Monitoring the detector so an outage does not go unnoticed

A jailbreak detector that fails open lets requests through when it cannot return a verdict, so an outage looks like normal operation to the application and to the user. Whether a failed classifier call blocks or passes a request depends on the integration's failure behavior, which you should confirm in your own configuration before go-live. Monitoring therefore has to track the detector as a service in its own right: whether the NIM endpoint is reachable, its error rate, its latency at the percentiles your application depends on, and the number of requests it blocks. Record these against a baseline taken from representative traffic. A block count that falls toward zero while attack-like traffic stays steady is often the first visible sign of a silent outage.

Alerts should fire on changes in shape, not only on hard failures. A sharp drop in blocks, a rise in classifier errors that the application logs but never surfaces, or latency that climbs toward your timeout each point to a detector that is failing quietly. Pair every alert with a runbook step that names an owner and a decision, such as switching the affected route to a fallback rail that does not depend on the NIM, or holding high-risk traffic until the detector recovers. Test the fallback in staging by stopping the NIM deliberately and confirming that the application behaves as the runbook says, including that the fallback itself produces logs and alerts.

Logs need enough detail to investigate a block or a miss without copying sensitive content into a second data store. Record the request identifier, the rail that made the decision, the verdict or score if your integration exposes it, the outcome (allowed, blocked or failed), the latency, and the deployed model and configuration version. Store prompt text only when your privacy and security owners have approved it for a named purpose, with a defined retention period and an access list. Ask the team responsible for observability which fields the NeMo Guardrails deployment emits by default, and confirm that a simulated outage appears on your dashboards before you rely on them.

Questions buyers ask about NemoGuard JailbreakDetect setup and cost

What drives the cost of setting up NemoGuard JailbreakDetect?

Cost is driven by where the NIM runs, how much GPU capacity it needs, and how much integration and testing the application requires. A hosted endpoint moves hardware into someone else's bill and leaves you with usage charges, while a self-hosted NIM means GPU nodes, a container platform, and the staff time to run them. Integration work covers the Colang or YAML configuration, the actions that call the detector, and the fail-open or fail-closed logic around it. Testing against DAN-style prompts and your own traffic is a separate line item. Ask any quote to split one-time build work from recurring hosting, monitoring and upgrade effort, and to state which GPU type and count it assumes.

Can our own team set up JailbreakDetect without a partner?

Yes, if your team already runs NeMo Guardrails in Python and operates GPU workloads or a self-hosted inference service. The NeMo Guardrails library is Apache 2.0 and its configuration is documented, so an engineering team can build a working detector on its own. The gaps usually appear in three places: sizing and operating the model server, writing a test set that represents real attack traffic, and documenting the setup for a security review. A partner can take any of those, or the whole build, under a written scope. Decide which parts you want to keep in-house before asking for a quote.

What does the work need from our team?

Plan for four inputs: a sample of production or representative prompts, with any personal data removed, so that false positives can be measured; a named security owner who signs off on the blocking behavior and the fail-open decision; access to the cloud account, cluster or data center where the NIM will run; and an engineer who knows the application's request path. Without the traffic sample, threshold and detector choices rest on guesswork. Without the sign-off, the team may discover late that a silent outage is accepted risk nobody approved. Confirm each input, its owner and its due date in the scope document.

How long does a JailbreakDetect setup take?

The duration depends on the scope you agree, not on a standard number. A hosted endpoint wired into one application with a basic test set is a small change. A self-hosted NIM on GPU infrastructure, with monitoring, fallback rails and a retest after tuning, takes longer because it depends on procurement, cluster readiness and access approvals. Those external lead times often set the schedule more than the configuration work does. Ask for a timeline that lists each dependency, the team that owns it, and the point at which the schedule depends on your infrastructure team's response.

Is NeMo Guardrails free to use under the Apache 2.0 license?

The NeMo Guardrails library is open source under the Apache License 2.0, and the project is published on PyPI and GitHub. The license covers the library's code, so you can use it, modify it and run it in your own infrastructure without a license fee from the project. It does not cover GPU hardware, cloud charges, model hosting or any NVIDIA commercial software or support contract. Check each model and NIM separately, because their terms can differ from the library license. Your legal team should confirm those terms against the NVIDIA documentation before procurement.

What happens to NeMo Guardrails after the microservice sunset?

NVIDIA has sunset the NeMo Guardrails microservice container, stating that as of October 1, 2026 there will be no new releases and the artifact is no longer supported. The open-source library continues to receive releases, with 0.25.0 published on 19 November 2026. If your design relies on the microservice container, you need a migration to the library, a server you build from it, or NVIDIA's successor platform, and you should ask your NVIDIA account team about next steps for existing users. Treat the microservice as a dependency to replace, not one to keep patching.

Who handles upgrades and monitoring after go-live?

Unless the contract says otherwise, the operating team owns this work, and it recurs. Someone must track NeMo Guardrails releases, such as the 0.25.0 release and its deprecation of LLMRails in favor of Guardrails, test the configuration after each upgrade, and watch the detector's health. Outages fail open in some integrations, so monitoring must alert on errors and missing detector results, not only on blocked requests. Ask whether a retainer covers upgrades, continuous testing and on-call response, and what response times apply.

Request flow from user input through the jailbreak check to the model

The flow starts when a user request reaches the NeMo Guardrails input rails, which call the jailbreak detection NIM before any model is invoked. The detector returns a verdict to the rail: a block ends the request with a refusal, while an allow passes the prompt to the application model. The point to check is the failure path, because a detector outage is not the same as a block. Monitoring watches detector health and fail-open events so a silent outage stays visible to the team.

Input rail checks each prompt with the jailbreak detector before the model is called.

How DeployOpen scopes, delivers and supports this integration

DeployOpen approaches NemoGuard JailbreakDetect NIM with NeMo Guardrails as a written, fixed-scope engagement covering the hosting choice, configuration, testing and monitoring of the detector. Each stage produces documented deliverables that your security and platform teams can review before and after handover.

How we scope

  • Confirm whether the detector will call NVIDIA's hosted endpoint or a NIM you run in your own infrastructure, and record the data handling implications.
  • Map which application entry points, languages and traffic types the jailbreak check must cover before any configuration is written.
  • Agree in writing how the detector outcome is handled, including blocking behavior and what happens when the detector is unavailable.

How we build

  • Configure the input rail in NeMo Guardrails so prompts are never embedded in configuration files and secrets stay in your secret store.
  • Test the integration with a set of DAN-style and other known jailbreak prompts, recording which are blocked and which pass.
  • Confirm the NeMo Guardrails Python version and library release in use, and document any Python 3.11 to 3.13 constraints for your runtime.

How we hand over

  • Deliver the configuration files, the test set and results, and a short runbook describing how to change the rail safely.
  • Document the monitoring signals to watch for detector errors, timeouts and silent fail-open behavior, with the alerts configured.
  • Walk your engineering and security teams through the design so they can review the decisions and operate the rail without us.

How we support

  • Support after handover can be provided as a retainer covering upgrades, re-testing and updates to the jailbreak test set.
  • Retesting after NeMo Guardrails or NIM version changes is scoped in writing, so your team knows what is included each time.
  • Ask any support provider to confirm response expectations and the boundaries of coverage in the written agreement before work starts.

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.