NeMo Guardrails
NVIDIA Python library that wraps LLM calls with configurable input, dialog, retrieval, tool, and output checks.
About
NVIDIA's guardrails library sits between application code and a language model, deciding what reaches the model, what comes back, and which actions it may trigger. Rules run at five points: on user input, in dialog flows, on retrieved RAG chunks, around tool calls, and on the final answer. Dialog behavior is written in Colang, a Python-flavored language for describing user intents and scripted bot replies; the older 1.0 syntax and the newer 2.0 one both load. A config folder holds a YAML file naming the models and active rails, the Colang files, and optional Python actions. Prebuilt rails cover jailbreak and injection detection, masking of personal data, self-checks for facts and hallucinations, NVIDIA safety models for content and topic control, and outside moderation services. Install it with pip on Python 3.10 to 3.13, then call it from Python, launch the bundled server with its OpenAI-style chat completions API, or build the Docker image. Code is Apache 2.0. Anonymous telemetry is on by default and an environment variable disables it. Aimed at teams shipping chatbots or RAG assistants under enforceable policies.
Should you use NeMo Guardrails?
Pick it when
Use NeMo Guardrails when a conversational app must stay on approved topics and follow defined dialog and tool-use policies, and your team is willing to learn Colang to express those rules.
Look elsewhere when
Skip it if you only need to validate output format, PII, or toxicity: guardrails-ai is lighter and plain Python. For agents reading untrusted tool output or writing code, llamafirewall targets those risks more directly.
Alternatives to NeMo Guardrails
- Guardrails AI
Composable Python validators from a hub for format, PII, and toxicity; no new language to learn, but no dialog flow control like Colang rails.
- LlamaFirewall
Built for agents: catches prompt injection in tool output, audits reasoning, and checks generated code, rather than steering conversation topics.
- Presidio
Focused PII detection and anonymization; use it when data protection is the only requirement and full conversational rails would be overkill.
- OpenAI Agents SDK
Input and output guardrails are built into the agent loop; enough for simple checks without a separate rail runtime, but far less expressive.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- AI Agents & Orchestration
- Price
- Free
- Platform
- Local/Desktop
- Difficulty
- Intermediate (3/5)
- License
- Apache-2.0
- Added
- Apr 3, 2026