Heads up This site is currently under heavy development.
← all tools
◆ AI/LLM Security

NeMo Guardrails

v0.24.0 open-source

NeMo Guardrails is a framework that adds safety constraints and moderation to large language models to prevent harmful outputs.

Summary

NeMo Guardrails is an open-source Python library, licensed under Apache 2.0, that adds programmable guardrails to LLM-based conversational applications to control outputs and block unsafe behavior. It's imported directly into an application's code, though it can also run as a standalone HTTP server exposing an OpenAI-compatible endpoint for checking inputs or outputs without generating a model response. It's built for developers building LLM applications who need to validate tool calls, screen retrieved content for context bloat, or detect and mask PII, using either local Hugging Face classifiers or integrations like Polygraf, rather than for security teams auditing systems after the fact. It sits in the LLM runtime-protection category, alongside the broader set of guardrail and content-filtering libraries developers reach for when wiring safety checks into a chat pipeline.

NeMo Guardrails is a framework that adds safety constraints and moderation to large language models to prevent harmful outputs.

What NeMo Guardrails answers

Can it validate tool calls before they execute, not just chat text?

streaming and non-streaming rails inspect both model-emitted tool calls and the results returned by the application, so a bad call can be caught before or after it runs

What does checking a single input or output cost me if I don't need a full chat turn?

a standalone endpoint runs the configured rails and returns whether the content passed, was modified, or was blocked, without spending a call generating a response

Do I need a GPU or an external service to run classifier-based checks?

the input, output, and retrieval classifiers run locally on Transformers, vLLM, KServe, or FMS, so screening works without a hosted dependency

Will upgrading break my existing environment?

it now requires a newer Pydantic line, so anything pinned to the older major version has to be upgraded first

How much does adding this library add to my deployment size?

the packaged distribution dropped to roughly a tenth of its previous size by dropping examples and development files

Does it help with prompt-stuffing or bloated retrieval context, or only unsafe content?

separate rails flag oversized, repetitive, low-entropy, or padded text coming from input or retrieval, which is a distinct check from safety filtering

all 8 features, with the evidence for each →

Features

8 capabilities across 4 areas

Built from everything we hold on NeMo Guardrails — every release we have summarised, its product documentation and how that documentation has changed, its README, its command-line surface and API, and runs we performed ourselves. Dates are when we first saw a capability, not when the vendor introduced it.

Capability area
Content Inspection and Filtering Rails 4 capabilities This is the core purpose of NeMo Guardrails: applying configurable checks to what goes into and comes out of an LLM. Rails can block, modify, or pass content based on policy, and can be run independently of model generation.
Context bloat detection rails shipped Detects oversized, repetitive, or padded content in inputs and retrieved context before it reaches the model. 1 release · first seen Jul 2026

release

  • Adds context bloat detection rails to flag oversized, repetitive, low-entropy, or padded input and retrieved content. v0.23.0 · Jul 2026 · source · release history
Hugging Face classifier rails shipped Uses lightweight local classifier models to screen inputs, outputs, or retrieved content for unwanted categories. 1 release · first seen Jul 2026

release

  • Adds lightweight Hugging Face classifier rails for input, output, and retrieval, backed by local Transformers, vLLM, KServe, and FMS. v0.23.0 · Jul 2026 · source · release history
Standalone rail checks shipped Runs input or output checks on their own, returning a clear pass, modify, or block decision without needing a full model generation cycle. 1 release · first seen Jul 2026

release

  • New /v1/checks endpoint on the OpenAI-compatible server runs input or output rails standalone, returning passed, modified, or blocked status without generating a model response. v0.23.0 · Jul 2026 · source · release history
Tool call validation rails shipped Checks that tool calls the model emits and results returned by the application are valid, supporting both streaming and non-streaming flows. 1 release · first seen Jul 2026

release

  • Adds streaming and non-streaming tool calling to IORails, with local rails that validate model-emitted tool calls and application-returned tool results. v0.23.0 · Jul 2026 · source · release history
Privacy and PII Protection 1 capability NeMo Guardrails can identify and obscure personally identifiable information before it travels through the pipeline. This applies to user inputs, model outputs, and content retrieved from external sources.
PII detection and masking rails shipped Detects and masks personally identifiable information in inputs, outputs, and retrieved content using a Polygraf integration. 1 release · 1 other source · first seen Jul 2026

release

  • Adds Polygraf integration for PII detection and masking across input, output, and retrieval rails. v0.23.0 · Jul 2026 · source · release history

example

  • Apply Polygraf PII detection and masking to user input before it reaches the LLM. rails: input: flows: - polygraf pii detection - polygraf pii masking v0.23.0 · Jul 2026 · source
Observability and Monitoring 1 capability The tool emits structured telemetry so operators can see exactly how rails are behaving in production. Spans cover the full request lifecycle including token usage and, optionally, the content itself.
OpenTelemetry observability for rails shipped Emits OpenTelemetry spans for every rail execution, capturing request and response attributes and token usage, with optional content recording. 1 release · first seen Jul 2026

release

  • Extends IORails OpenTelemetry support with opt-in content capture and richer request, response, and token-usage span attributes. v0.23.0 · Jul 2026 · source · release history
Integrations and Ecosystem Compatibility 2 capabilities NeMo Guardrails connects to common LLM frameworks and retrieval infrastructure so guardrails can be added without rebuilding existing pipelines. This includes framework-level integrations and the underlying search mechanism used by rails.
Embedding similarity search shipped Provides embedding-based similarity search using a NumPy index by default, removing the need for a native C++ dependency. 1 release · first seen Jul 2026

release

  • Replaces Annoy with exact NumPy search as the default embedding index, removing the native C++ dependency while preserving similarity-threshold semantics. v0.23.0 · Jul 2026 · source · release history
LangChain integration shipped Integrates with LangChain, including the OpenAI Responses API and Harmony response format models, so existing chains can be wrapped with rails. 1 release · first seen Jul 2026

release

  • LangChain integration adds support for the OpenAI Responses API and Harmony response format models. v0.23.0 · Jul 2026 · source · release history
Capability
Evidence

Lines in monospace are the tool's own words — help text parsed from its source, or an endpoint from its API document. Everything else is our summary of a dated release or documentation change, linked back to the source it came from.

Release history

  1. v0.24.0 Aug 26, 2026 · issue 009

    NeMo Guardrails v0.24.0 adds RailOutcome, rail manifests, F5 integration, health endpoints, and expands IORails to 59 built-in rails.

    └──▷ GET THIS VERSION
    $ git clone --branch v0.24.0 https://github.com/NVIDIA-NeMo/Guardrails.git
    # already have the repo? check out this version:
    $ git checkout v0.24.0
    └──▷ TRY IT
    Poll the new health endpoint to verify a running Guardrails server is ready before routing traffic.
    $ curl -s http://localhost:8000/v1/health
    Run output-rail checks against a server-loaded config by supplying config_id to /v1/checks.
    $ curl -s -X POST http://localhost:8000/v1/checks \
      -H 'Content-Type: application/json' \
      -d '{"config_id": "my-guardrails-config", "messages": [{"role": "assistant", "content": "Here is the answer."}]}'
    • Adds RailOutcome — an engine-neutral allow, block, or transform result that both LLMRails and IORails can enforce from a single rail action return value.
    • Adds typed rail manifests so built-in rails declare their configuration, actions, execution surfaces, requirements, and privacy properties for automatic discovery by both engines.
    • Adds /v1/health and /healthz server health-check endpoints.
    • Adds output-rail checking mode to the /v1/checks endpoint, which now selects a server-loaded configuration via config_id or the server default.
    • Adds F5 Guardrails integration as a new built-in library rail.
    +5 moreshow less
    • Adds a canonical outbound HTTP client shared by all built-in integrations, providing connection pooling, retries, TLS, error handling, lifecycle management, and privacy-safe tracing and metrics.
    • Adds shared model telemetry and an instrumented model decorator for LLM call observability.
    • Expands IORails to execute 59 of the library's 67 action-backed input and output surfaces, including community integrations and content-transforming rails, sharing the same rail implementations as LLMRails.
    • Supports running multiple self-check rails simultaneously with per-rail namespaced task prompts.
    • IORails now returns GenerationResponse from non-streaming generate() and generate_async() calls when generation options are supplied.
    └──▷ BREAKING ON UPGRADE
    • !Custom actions using @action(output_mapping=...) must remove that argument and return an explicit RailOutcome instead.
    • !The hf-classifier install extra is removed; install transformers and torch directly for the local classifier backend.
    • !IORails generate() and generate_async() calls that supply generation options now return GenerationResponse; message lists must be passed with messages= as a keyword argument rather than positionally.
    • !Custom Colang 1 flows using the former space-separated Cleanlab, Fiddler, or GCP action names must switch to their snake_case names.
    • !/v1/checks no longer accepts inline configuration; select a server-loaded configuration using config_id or rely on the server default.
    • !Chat Completions requests must use supported role-specific OpenAI message shapes; internal event payloads, unexpected fields, and audio requests are now rejected.
my-toolchain — 0 tools
paste an install list to detect your tools

A brew list, a Brewfile, requirements.txt, a Dockerfile — or just the product names, free-form. Nothing leaves your browser.

    browse all tools →