← Back to Leaderboard
GNVIDIA-NeMo

NVIDIA-NeMo/Guardrails

Python policy layer for checking LLM traffic and agent tool calls

AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A · 81/100
Maintenance Activity
● Updated today
Latest Release
v0.25.0
Commercial License Check
Custom / Check Repo

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption20/25
Release Cadence20/20
License Clarity6/20
DockerSelf-HostedAPI
Total Stars
★ 7,635
24h Growth
+4
7d Growth
+44
Forks
928

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

NVIDIA-NeMo/Guardrails Star History (2023-04-24 - 2026-12-04) ALL-TIME STAR HISTORY (2023-04 – 2026-12) +7.6k in 1320d · avg +6/day 8.1k 4k 0 2023-04-24: ★ 12023-07-15: ★ 1,7492023-10-07: ★ 2,2422023-12-30: ★ 2,6322024-03-23: ★ 3,1062024-06-15: ★ 3,5282024-09-07: ★ 3,8472024-11-30: ★ 4,1332025-02-22: ★ 4,3532025-05-17: ★ 4,6472025-08-09: ★ 4,8862025-11-01: ★ 5,1352026-01-24: ★ 5,4792026-04-18: ★ 5,9562026-07-11: ★ 6,6262026-10-03: ★ 7,2102026-12-04: ★ 7,635 ★ 7.6k 2023-04 2025-02 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

NeMo Guardrails is a policy layer, not an agent runtime. Configuration selects rails, models, and prompts. In check mode, the application owns model generation and tool execution, calling check_async() or POST /v1/checks at the points where it needs a verdict. Tool checks through check_async() require the IORails engine and an explicit RailType.TOOL_CALL or RailType.TOOL_RESULT. The harness must act on the verdict before executing a tool or handing its result back to the model.

In proxy mode, generate_async(), stream_async(), or the server's /v1/chat/completions path wraps model generation with input and output checks. The separate Gateway targets existing model APIs, while the hooks server integrates with coding agents. The Python package declares aiohttp and httpx for HTTP, jsonschema for schema validation, and fastembed and onnxruntime for embedding and inference dependencies. Their presence does not imply that every policy performs local inference.

Key Capabilities & Differentiators

Tool rails validate declared tool names, argument schemas, and the structure and linkage of results. Per-tool policy can add regex or CEL rules and LLM-judged safety checks. The catalog also covers content and topic controls, jailbreak detection, PII detection or masking, and evidence-grounding checks for retrieval-augmented generation. Detector choices include local rules, Nemotron safety models such as Nemotron 3.5 Content Safety, and hosted or third-party services. Check mode avoids main-model generation, but model-backed checks still invoke their configured detector.

In a non-streaming server benchmark on an Apple M4, with 5,000 ms of fixed mock model latency subtracted, IORails added 13 ms p50 and 126 ms p99 at concurrency 64, versus 93 ms and 2,094 ms for LLMRails. At concurrency 128, IORails added 17 ms p50 but 2,880 ms p99. That gap makes tail latency a deployment concern even when the median looks stable. These figures include HTTP calls to mock endpoints and do not predict latency with real detectors.

Trade-offs & Limitations

Compared with inline validators, NeMo Guardrails lets teams share policy across applications and combine deterministic rules with model judgments, at the cost of configuration and more enforcement points to wire up and test. Compared with provider moderation, it gives the application control over where to check tool arguments, tool results, and retrieved content. It does not replace authorization or execution isolation. Keep hard constraints in deterministic checks and budget separately for the latency and cost of model-backed checks.

Integration choice affects what can be enforced. The Gateway's built-in profiles do not support tool content, and /v1/responses requires store: false. In stream_async(), the default stream_first: true releases chunks before checking; set it to false when content must be checked before delivery. Define how the application responds to errors and overload, especially before executing side-effecting tools. The Apache-2.0 package license does not override the terms or data-handling practices of configured services.

Hardware & Deployment Guide

The package requires Python 3.11–3.13 and installs as nemoguardrails; CEL is an optional extra. The Dockerfile starts from python:3.12-slim, installs Git, GCC, and G++, and copies a digest-pinned uv build. Embed the SDK for in-process checks, self-host the FastAPI service for shared verdicts, or put the Gateway in front of supported model API traffic. A local, model-free policy can run without an inference endpoint; local detector sizing depends on the selected model and concurrency. A self-hosted service can still send payloads to configured external detectors.

Version 0.24.0 expanded IORails coverage to 59 of 67 action-backed input and output surfaces; 0.24.1 added an overload response for IORails. Version 0.25.0 adds tool-call and tool-result checks, the hooks server, and the Gateway. It also deprecates LLMRails, with removal planned no earlier than 0.27.0. Use Guardrails for new integrations and verify engine and integration support for each required rail before migrating.

Enforcement boundary: The application executes tools; check_async() returns policy decisions at the call and result stages.
Deterministic policy: The optional CEL extra supports model-free per-tool rules, such as blocking refunds above $500 after schema validation.
Integration surfaces: Embed the Python SDK, share verdicts through POST /v1/checks, or connect Claude Code, Codex, and NeMo Relay through the hooks server.
Proxy compatibility: The Gateway serves /v1/chat/completions and /v1/responses; built-in profiles do not support tool content, and Responses requests require store: false.
Streaming behavior: stream_async() delivers chunks before checking by default; set rails.output.streaming.stream_first: false to check before delivery.
Tail latency: In the mocked Apple M4 benchmark, IORails p50/p99 added latency was 13/126 ms at concurrency 64 and 17/2,880 ms at 128.
Best For

Teams that own their agent loop and need reusable policy across model messages, tool calls, and tool results, with a choice of in-process checks or a shared service.

Skip If

A few inline validators or a provider moderation endpoint cover your needs, or you need a sandbox or authorization system that independently prevents tool execution.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedAPI
pip install nemoguardrails

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
Guardrails ★7.6k+44Python—Python policy layer for checking LLM traffic and agent tool calls
browser-use122.7k+477PythonMITPython REPL and CDP for adaptive browser automation
langgraph45.8k+293PythonMITPython graph orchestration for stateful, resumable agents and workflows
langchain150.4k+290PythonMITModular Python framework for building agents across model providers

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/NVIDIA-NeMo/Guardrails.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

NVIDIA-NeMo/Guardrails Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about Guardrails

How do I add tool checks without replacing my agent loop?

Call check_async() with the IORails engine and RailType.TOOL_CALL before execution, supplying the declared tool schemas. Check the result with RailType.TOOL_RESULT before returning it to the model. The harness still executes tools and must decide how to handle blocked, modified, or failed checks. For a new integration, use Guardrails rather than the deprecated LLMRails.

Do I need a GPU, and how should I size the service?

A deterministic CEL policy can run with no configured model or API key; no project-wide GPU or VRAM requirement is established. With hosted detectors, measure service latency, timeouts, and concurrency. With local detectors, size CPU, memory, and any accelerator for the chosen model and serving setup. Load-test p95 and p99 with your actual rules, payloads, and traffic rather than treating the mocked server benchmark as a capacity estimate.

Can I self-host NeMo Guardrails for commercial use?

The Python package is Apache-2.0 licensed, which permits commercial use subject to its terms. Review the license and notice obligations for redistribution, as well as the separate terms of any models or services you connect. NEMO_GUARDRAILS_NO_USAGE_STATS=1 disables library usage telemetry, not outbound calls to configured endpoints. NVIDIA Build is evaluation-only and must not receive confidential information or personal data.

When is NeMo Guardrails preferable to inline validators or provider moderation?

Inline schema validation and a few business rules are simpler when one application owns a small, stable tool set. Provider moderation is a better fit when the requirement is limited to content checks at that provider. NeMo Guardrails is worth the extra configuration when you need reusable policies across applications, checks before and after tool execution, or a mix of local rules and model-backed checks.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining NVIDIA-NeMo/Guardrails? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature NVIDIA-NeMo/Guardrails on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare