Configuration YAML Schema Reference
This reference documents all configuration options for config.yml, derived from the authoritative Pydantic schema in nemoguardrails/rails/llm/config.py.
Models Configuration
The models key defines LLM providers and models used by the NVIDIA NeMo Guardrails library.
Model Schema
Model Attributes
Model Types
The type field is a free-form string identifier. Certain types have special handling in the runtime, while custom types can be defined and referenced in flows via $model=<type>.
Reserved Types
These types have special handling in the runtime:
Commonly-Used Types
The following types are commonly used with guardrails:
Custom Types
You can define any custom type and reference it in flows. For example:
The runtime validates that any $model=<type> reference in flows has a matching model defined in the configuration.
Engines
Starting with v0.22, the library serves engines through either the built-in OpenAI-compatible client or LangChain. Use the built-in client whenever the underlying wire protocol is OpenAI-compatible. Opt into LangChain only for engines whose API is not OpenAI-compatible, such as Vertex AI, Anthropic, Cohere, and the in-process Hugging Face pipeline. For the full mapping, refer to Inference Providers. For migration recipes, refer to Migrating to 0.22.
Built-in Engines
These engines work with pip install nemoguardrails and do not require extra provider packages. Pass parameters.base_url to point at a self-hosted or alternative endpoint.
For OpenAI-compatible providers without a dedicated engine entry (vLLM, TGI, OpenRouter, Together.ai, Fireworks.ai, Groq, DeepSeek, llama.cpp server, and similar), use engine: openai with parameters.base_url and parameters.api_key.
LangChain Engines
To use one of these engines, set NEMOGUARDRAILS_LLM_FRAMEWORK=langchain and install the matching langchain-* provider package.
Embedding Engines
Model Cache Configuration
Rails Configuration
The rails key configures guardrails that control LLM behavior.
Rails Schema
Rail Types
The following table summarizes the available rail types and their trigger points.
The following diagram shows the guardrails process described in the table above in detail.

Input Rails
Process user messages before they reach the LLM.
Built-in Input Flows
Output Rails
Process LLM responses before returning to users.
Output Streaming Configuration
Built-in Output Flows
Retrieval Rails
Process chunks retrieved from knowledge base.
Dialog Rails
Control conversation flow after user intent is determined.
Execution Rails
Control tool and action invocations.
Action Rails
Control custom action and tool invocations.
Tool Rails
The tool_call rails check the tool calls a model emits, and the tool_result rails check the tool results returned to the model.
LLMRails runs the Colang flows configured in each section. IORails provides the following built-in structural validation flows:
With IORails, each section’s flows field accepts only its own built-in flow name: tool_call accepts tool call validation, and tool_result accepts tool result validation.
The tool_output and tool_input fields are deprecated aliases for tool_call and tool_result, respectively.
Since each section names at most one flow, parallel has no observable effect on them: they always run one at a time regardless of the setting.
Each section also accepts a per_tool field, keyed by tool name, scoping a check to one specific tool’s calls or results, for example:
Unlike the fixed flows above, a request can run per-tool checks for several tool calls, or several flows for one tool, at once. parallel is honored here: set it to run those checks concurrently instead of one after another.
When multiple checks run concurrently and more than one would block, only the first to complete and block is reported; the same conversation history can therefore produce a different blocking rail or reason across runs, depending on which check’s judge model or backend responds fastest.
For configuration details and behavior, see Tool Calling.
Rails Config Section
The rails.config section contains configuration for specific built-in rails.
Jailbreak Detection
Sensitive Data Detection (Presidio)
Injection Detection
Fact Checking
Content Safety
The multilingual feature supports the following languages:
If the detected language is not in this list, English is used as the fallback. For more information, refer to Multilingual Content Safety.
Third-Party Integrations
AutoAlign
For more information, refer to AutoAlign Integration.
Patronus
For more information, refer to Patronus Evaluate API Integration.
Clavata
For more information, refer to Clavata Integration.
Pangea AI Guard
For more information, refer to Pangea AI Guard Integration.
Trend Micro
For more information, refer to Trend Micro Integration.
Cisco AI Defense
For more information, refer to Cisco AI Defense Integration.
Private AI
For more information, refer to Private AI Integration.
Fiddler Guardrails
For more information, refer to Fiddler Guardrails Integration.
Guardrails AI
For more information, refer to Guardrails AI Integration.
Prompts Configuration
Define prompts for LLM tasks.
Available Tasks
The following table lists all available tasks you can specify to prompts.task.
Available Prompt Message Types
The following table lists all available message types you can specify to prompts.messages.type.
Other Configuration Options
Instructions
Sample Conversation
Knowledge Base
Core Settings
Tracing
Streaming
Hooks Server Tool Policy
The top-level hooks_server section sets the tool policy of the Guardrails hooks server, which applies it to each tool call before any rail runs.
Only the hooks server reads it: the Guardrails API server and the Python API ignore it.
The configuration fails to load when a list names a tool twice, when allowed_tools allows a tool that blocked_tools blocks by name, when a {name, arguments} entry has an empty arguments list or names an argument twice, or when the section or an entry has an unknown key.
Set hooks_server in one file.
When more than one file of a configuration, or a configuration it imports through import_paths, sets it, the configuration fails to load, naming the file where the second section was found.
Likewise, combining two configurations with + raises ValueError when both set a hooks_server section.
Keeping the policy in one file means no other file can drop its restrictions or widen its allowlist.
For how the hooks server applies the policy, refer to Run the Hooks Server: The Tool Policy.
Import Paths
Complete Example
The following config.yml example defines a main language model, a dedicated content safety model, and an embeddings model. It enables input and output content safety checks with a prompt for each check and configures output rail streaming. The main model uses NVIDIA-hosted inference and requires NVIDIA_API_KEY; start the content safety model at http://localhost:8123/v1 before running the configuration. The port avoids a conflict with the Guardrails server’s default port, 8000. For deployment steps, refer to Nemotron Safety Guard Deployment.
The prompts are the NemoGuard content safety prompts from the content safety example, which match the response format that the configured parsers expect.