NVIDIA NeMo Guardrails Library

Programmable guardrails for LLM-based conversational systems to ensure safety, trust, and control.

Stars
★ 7.6k
Last updated
1d ago v0.25.0
FARS reviewed
Nov 08, 2026 +1 new
License
NOASSERTION
Primary language
Python

At a glance

How it runs
Library / SDKCLISelf-hosted service
Works with
Universal · cross-platform
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.10+OpenAI API key or other LLM provider keyShell / CLINetwork accessLocal filesystem
Typical use
Developers building a customer service bot with GPT-4 that must stay on-topic and fact-check responses.
Not a fit if
  • Developers unwilling to learn the Colang modeling language
  • Teams with strict compliance rules against anonymous telemetry leaving the machine
Website
docs.nvidia.com ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-12-01latest release v0.25.0 (2026-11-19)+6.7 ★/day over 7 days

What does this agent do, and when should you use it?

NeMo Guardrails is an open-source toolkit from NVIDIA for adding programmable guardrails (rails) to LLM-based conversational applications. It defines five types of rails—input, dialog, retrieval, execution, and output—using the Colang modeling language, and includes built-in guardrails for fact-checking, hallucination detection, jailbreak prevention, and sensitive data masking. The library provides a Python API (LLMRails) and a CLI server (nemoguardrails server), supports multiple LLM providers (e.g., OpenAI, NVIDIA NIM), and offers optional LangChain integration. Telemetry is collected anonymously but can be disabled via environment variables. Licensed under Apache 2.0.

The library inserts a guardrails layer between application code and the LLM. Users call LLMRails.generate() or generate_async() with a list of messages, and the layer applies configured input/dialog/retrieval/execution/output rails—such as jailbreak detection, sensitive data masking, self-check facts, and hallucination detection—before returning a standard Chat Completions format response. Configuration is defined in config.yml and .co files, with custom actions in actions.py. The CLI supports interactive chat (nemoguardrails chat), server startup, and evaluation (nemoguardrails evaluate).

  1. Developers building a customer service bot with GPT-4 that must stay on-topic and fact-check responses.
  2. Enterprise RAG systems needing to filter toxic retrieved chunks and validate generated content.
  3. Domain-specific assistants that must follow standard operating procedures (authentication, support flows).
  4. Teams wanting to add a safety layer to their custom LLM endpoints to prevent jailbreaks and prompt injections.
  5. LangChain users who want to wrap their chains with guardrails for extra safety.
  6. Product teams that need to hardcode conversational paths for compliance and consistency.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install nemoguardrails. Requires Python 3.10 to 3.13 and API keys from your chosen LLM provider (e.g., OpenAI)
Config files
config.yml
Runtime
Python 3.10

How do you install or deploy this agent?

Install via pip: pip install nemoguardrails. Requires Python 3.10 to 3.13 and API keys from your chosen LLM provider (e.g., OpenAI).

How do you use this agent?

  1. Create a config directory with config.yml (model and rail settings), .co files (Colang flows), and optionally actions.py. 2. Use the LLMRails class: from nemoguardrails import LLMRails, RailsConfig; config = RailsConfig.from_path('PATH/TO/CONFIG'); rails = LLMRails(config); completion = rails.generate(messages=[{'role': 'user', 'content': 'Hello world!'}]). 3. Optionally start a server: nemoguardrails server --config PATH/TO/CONFIGS --port 8000, and interact via the /v1/chat/completions endpoint.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Verified present in source (3/3)
  • data-flow disclosure
Not found in source — apply before daily use
  • confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.

What are this agent's strengths and limitations?

Pros
  • Five guardrail types cover input, dialog, retrieval, execution, and output, providing comprehensive protection.
  • Built-in guardrails library includes jailbreak detection, fact-checking, hallucination detection, and integrations with NVIDIA safety models and third-party APIs.
  • Supports multiple LLMs (OpenAI, NVIDIA NIM, etc.) with sync and async APIs for flexible integration.
  • Includes evaluation tools and vulnerability scanning reports to quantify safety.
  • Apache 2.0 license, open for community contributions.
Limitations
  • Requires learning Colang modeling language, adding a learning curve.
  • Dependent on LLM providers, requiring API keys and incurring costs.
  • Default telemetry collection requires opt-out via environment variables.
  • LangChain integration is optional and requires additional installation and configuration.
  • Built-in guardrails may not be suitable for all production scenarios without adjustment.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
NVIDIA NeMo Guardrails Library This agent 73 · Some gaps Library / SDKFree + model costs ★ 7.6k 1d ago Python —
GraphBit 55 · Major gaps Library / SDKFree + model costs ★ 583 5mo ago Rust OpenAI API · Claude API
Promptise Foundry 81 · Good Library / SDKFree + model costs ★ 897 1d ago Python Claude.ai · OpenAI API · Claude API
OpenAI Agents SDK 76 · Good Library / SDKFree + model costs ★ 31k today Python OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
73/ 100 5-point scale 3.7 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 1 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 16/29
Reliability 9/14
Adaptability 15/18
Convention 16/18
Effectiveness 12/13
Verifiability 5/8
Why each dimension lost points
Trust16 / 29 · 2.8/5

The README specifies telemetry fields, excluded data, the local audit file, and opt-out methods, and distinguishes third-party endpoints and credentials; this supports a strong transparency score. Telemetry starts by default and opt-out must be set before startup, so per-use confirmation is absent. Documentation describes sensitive-data detection and tool-permission boundaries, but does not establish protection across every integration or log. Dependency security, external effects, and rollback receive limited treatment in the supplied material. A paper citation and Apache-2.0 license support attribution, while maintenance responsibility and publisher identity remain unclear.

Reliability9 / 14 · 3.2/5

The documentation presents a mostly coherent path across the Python API, CLI, configuration, and use cases, and installation guidance covers version requirements and optional dependencies. Failure guidance is illustrated in only a few missing-dependency cases; the supplied source does not provide enough runtime implementation detail to justify higher scores.

Adaptability15 / 18 · 4.2/5

The material covers question answering, RAG, dialog flows, endpoints, and tool use, and distinguishes input, retrieval, execution, and output rails. The FAQ describes engine differences, streaming tradeoffs, application-owned identity and policy decisions, and deployment boundaries. Skills state intended tasks and trigger terms, but their sample coverage limits the evidence for trigger precision and environment fit.

Convention16 / 18 · 4.4/5

Repository structure, configuration guidance, installation steps, optional dependencies, examples, FAQs, and known limitations are documented substantially. The README and installation guide identify the Apache-2.0 license. Version information identifies a release and Python compatibility change, but the supplied material does not include a complete change history. Contribution guidance describes workflow, while specific maintenance ownership and update commitments are not clear.

Effectiveness12 / 13 · 4.6/5

The Python API, CLI, server, configuration examples, and evaluation tools give developers usable paths to follow. The framework brings several kinds of rails into a shared layer, showing clear added value; actual benefit, latency, and operating costs depend on models, services, and configuration, and the material offers evaluation methods rather than a general cost-benefit result.

Verifiability5 / 8 · 3.1/5

Many descriptions point to configuration, installation, evaluation documentation, and a cited paper; the FAQ gives concrete boundaries for engines, deployment, and streaming. The README's telemetry account is specific, but this is a static sample and cannot verify each implementation claim. Sources corroborate some points but do not establish all behavior. The text often distinguishes capabilities from limitations, though some benefit and safety claims lack accompanying independently reviewable evidence.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Telemetry is enabled by default; set an opt-out before the library starts if you do not want it. Opting out does not change the data practices of a selected third-party inference endpoint.
  • Do not treat rails as a security guarantee: the documentation says protections depend on configuration, engine, and deployment. The application or service remains responsible for tool permissions, identity checks, and log protection.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 537fd7742982 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/guardrails.svg)](https://followagents.com/en/agents/guardrails)
<a href="https://followagents.com/en/agents/guardrails"><img src="https://followagents.com/badge/guardrails.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.25.0
    Release notes excerpt
    What's Changed NeMo Guardrails 0.25.0 adds checks for agent tool calls and results, a hooks server for Claude Code, Codex, and NeMo Relay, and the NeMo Guardrails Gateway for applying input and output checks around existing model APIs. New rails provide LLM-judged tool safety, CEL expressions, and language-based filtering; Zscaler AI Guard moderation is also available again. …
    View on GitHub ↗
  2. v0.24.1
    Release notes excerpt
    What's Changed This patch release addresses bug fixes and improvements. 🐛 Bug Fixes - *(benchmark)* Correct Locust concurrency measurements and sweeps ([#2323](https://github.com/NVIDIA-NeMo/Guardrails/issues/2323)) - *(content-safety)* Parse Nemotron 3.5 responses ([#2370](https://github.com/NVIDIA-NeMo/Guardrails/issues/2370)) - *(server)* Return overload response for IORails admission shedding ([#2334](https://github.com/NVIDIA-NeMo/Guardrails/issues/2334)) - *(rails)* Load config.py for combined configurations ([#2371](https://github.com/NVIDIA-NeMo/Guardrails/issues/2371)) …
    View on GitHub ↗
  3. v0.24.0
    Release notes excerpt
    What's Changed NeMo Guardrails 0.24.0 substantially expands the built-in rails available through IORails. IORails can now execute 59 of the library's 67 action-backed input and output surfaces, including community integrations and rails that transform content, while sharing the same underlying rail implementations with LLMRails. Three related foundations make this possible: - RailOutcome: decide once, render many. A rail action returns one engine-neutral allow, block, or transform result that either LLMRails or IORails can enforce. …
    View on GitHub ↗

FAQ

How do I disable telemetry?
Set the environment variable NEMO_GUARDRAILS_NO_USAGE_STATS=1 or DO_NOT_TRACK=1 before the library starts, or create a do_not_track file in the config directory.
Does it support local LLMs?
Yes, you can configure local models like LLaMa-2 or Falcon by specifying the engine in config.yml.
How to add custom guardrails?
Write .co files defining Colang flows and register them in config.yml. You can also implement custom actions in actions.py.
Will adding guardrails impact performance?
Yes, because it adds additional LLM calls and checks. You can balance by selectively enabling rails.
What should I consider for production use?
Built-in guardrails may not be fully compliant with your industry; work with your internal team to test and adjust.
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts