Practical overview
When it fits
Use it while building or adapting an LLM-based application when you need programmable conversation rules between application code and the model.
Who it is for
- Developers building LLM-powered applications who need configurable conversation behavior.
- Teams building document question-answering, domain-specific assistants or custom LLM endpoints.
- Developers who want to add a guardrails layer around LangChain chains.
Documented uses
- Define how an assistant handles selected topics or user requests.
- Guide conversations along predefined dialog paths, including workflows such as authentication or support.
- Add fact-checking and output moderation to document question-answering applications.
- Apply controls to user input, including rejecting or altering it.
- Route model requests through a configured layer using synchronous or asynchronous Python calls.
Requirements & limits
The project is described as open source. The README documents pip installation and requires Python 3.10, 3.11, 3.12 or 3.13.
- It is a library and integration layer, so use requires an LLM-based application and a guardrails configuration.
- The repository documents a Python API and a guardrails server as integration routes.
- The README identifies an optional LangChain integration and several supported model families; consult the official guides for configuration details.
- The project aims to help address jailbreaks and prompt injection, but configured controls are not a security guarantee.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Route an application request through the Python API
Load a guardrails configuration and make an LLM request through an LLMRails instance.
Before you start
- The NeMo Guardrails Python package.
- A guardrails configuration available at a path.
- An LLM-based application and model configuration.
Steps
Load the configuration with
RailsConfig.from_path("PATH/TO/CONFIG").Create an instance with
LLMRails(config).Call
rails.generatewith a messages list, or use the documented asynchronousgenerate_asyncmethod.
Expected outcome
The application submits its request through the guardrails layer, which returns a completion in a chat-style message format.
Guide limitations
- The example assumes a valid configuration and model setup; those details must be prepared separately.
- The example does not establish that a particular configuration or model integration will work in every environment.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- NVIDIA-NeMo/Guardrails · Official homepage title · retained in its source language

