For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • About NVIDIA NeMo Relay
    • Overview
    • Architecture
    • Ecosystem
    • Concepts
    • Release Notes
  • Getting Started
    • Agent Runtime Primer
    • Prerequisites
    • Installation
    • Configuration / Setup
    • Quick Start
  • NVIDIA NeMo Relay CLI
    • About
    • Basic Usage
    • Claude Code
    • Codex
    • Cursor
    • Hermes Agent
  • Supported Integrations
    • About
    • OpenClaw Plugin Guide
    • LangChain Integration Guide
    • LangGraph Integration Guide
    • Deep Agents Integration Guide
  • Instrument Applications
    • About
    • Adding Scopes and Marks
    • Instrument a Tool Call
    • Instrument an LLM Call
    • Add Middleware
    • Code Examples
  • Observability Plugin
    • About
    • Configuration
    • Agent Trajectory Interchange Format (ATIF)
    • Agent Trajectory Observability Format (ATOF)
    • OpenTelemetry
    • OpenInference
  • Adaptive Plugin
    • About
    • Configuration
    • Adaptive Cache Governor (ACG)
    • Adaptive Hints
  • NeMo Guardrails Plugin
    • About
    • Configuration
  • Integrate into Frameworks
    • About
    • Adding Scopes
    • Wrap Tool Calls
    • Wrap LLM Calls
    • Handle Non-Serializable Data
    • Using Codecs
    • Provider Codecs
    • Provider Response Codecs
    • Code Examples
  • Build Plugins
    • About
    • Define a Plugin
    • Validate Plugin Configuration
    • Plugin Configuration Files
    • Register Plugin Behavior
    • Design Plugin Configuration
    • NeMo Guardrails Example Plugin
    • Code Examples
  • Contribute
    • About
    • Development Setup
    • Workflow and Reviews
    • Testing and Documentation
  • Reference
    • APIs
    • Performance
  • Resources
    • Support and FAQs
    • Glossary
    • Troubleshooting Guide
    • Community
    • Legal
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogo
On this page
  • Component Shape
  • Current Remote Support
  • Remote Requirements
  • plugins.toml Example
  • Remote Mode Rules
  • Codec Boundary
  • Managed Tool Boundary
  • Request Defaults
  • Observability
NeMo Guardrails Plugin

NeMo Guardrails Configuration

||View as Markdown|
Previous

NeMo Guardrails Plugin

Next

About

Use this page when you want to configure the built-in NeMo Guardrails plugin component. The component kind is nemo_guardrails.

The current shipped user-facing backend is mode = "remote". local remains part of the config model, but it is not yet a finished user-facing backend.

For plugin file discovery, precedence, merge behavior, editor controls, and gateway conflict rules, see Plugin Configuration Files.

NeMo Relay plugin configuration uses the generic plugin document shape, so field names stay snake_case in every binding and in plugins.toml.

Component Shape

The top-level NeMo Guardrails object contains:

FieldPurpose
versionGuardrails config schema version. Defaults to 1.
modeBackend mode. Current values are remote and local.
config_pathLocal-mode native Guardrails config directory path.
config_yamlLocal-mode inline native Guardrails YAML config.
colang_contentOptional inline Colang content for local mode when config_yaml is used.
codecManaged LLM provider codec.
inputEnables managed LLM input checks.
outputEnables managed LLM output checks.
tool_inputPart of the built-in plugin model for managed tool-argument checks before execution. The current stock-remote backend rejects it.
tool_outputEnables managed tool-result checks after execution.
priorityMiddleware priority for installed execution intercepts.
remoteRemote backend settings.
localLocal backend settings for future local mode.
request_defaultsDefault request-time Guardrails semantics passed to the backend.
policyComponent-local handling for unknown fields and unsupported values.

At least one managed Guardrails surface must be enabled.

Current Remote Support

The current built-in remote backend supports:

AreaSupport
Built-in component kind and config validationSupported
Managed LLM inputSupported
Managed LLM outputSupported
Managed streaming LLM execution over the remote HTTP(S) contractSupported
Managed tool_outputSupported
Managed tool_inputNot supported against the stock Guardrails remote contract
request_defaults pass-throughSupported
local modeNot implemented yet

Remote Requirements

To use mode = "remote", the configured remote.endpoint must point at a Guardrails service that NeMo Relay can reach from the running process and that exposes the Guardrails remote HTTP(S) contract.

The NeMo Relay plugin config activates Guardrails integration, but the Guardrails service still owns the actual policy content. In practice, NeMo Relay decides when managed checks run, while the Guardrails config decides what to block, allow, or rewrite.

plugins.toml Example

1version = 1
2
3[[components]]
4kind = "nemo_guardrails"
5enabled = true
6
7[components.config]
8version = 1
9mode = "remote"
10codec = "openai_chat"
11input = true
12output = true
13tool_output = true
14
15[components.config.remote]
16endpoint = "http://127.0.0.1:8000"
17config_id = "live-smoke"
18timeout_millis = 3000
19
20[components.config.request_defaults.context]
21tenant = "demo"
22
23[components.config.request_defaults.rails]
24input = true
25output = true
26
27[components.config.policy]
28unknown_component = "warn"
29unknown_field = "warn"
30unsupported_value = "error"

This example configures the built-in remote backend for a Guardrails service that uses codec = "openai_chat", managed LLM input and output, managed tool_output, and request-default pass-through for backend context plus backend input and output rail selection.

In that setup, the NeMo Relay plugin chose the managed surfaces to wrap, while the Guardrails config defined the actual blocking policy, such as rejecting secret-seeking prompts, bypass attempts, specific blocked tokens, or private-key-like output.

For example, the Guardrails-side policy can look like this:

1rails:
2 input:
3 flows:
4 - self check input
5 output:
6 flows:
7 - self check output

This Guardrails-side config defines the policy logic. The NeMo Relay plugin config decides when those checks run.

Remote Mode Rules

When mode = "remote":

  • remote.endpoint is required.
  • Exactly one of remote.config_id or remote.config_ids is required.
  • config_path, config_yaml, and colang_content cannot be present.
  • local settings cannot be present.
  • The backend uses the Guardrails remote HTTP(S) contract for both non-streaming and streaming LLM execution.

Codec Boundary

The current built-in remote backend supports managed LLM execution only with:

  • openai_chat

Managed Tool Boundary

The current remote backend supports managed tool_output.

The current remote backend rejects managed tool_input explicitly because the stock Guardrails remote contract does not activate pre-execution tool-call rails from externally submitted /v1/chat/completions history. NeMo Relay rejects tool_input in remote mode rather than leaving a silent non-enforcing path.

Request Defaults

request_defaults lets the built-in plugin pass request-time semantics through to the selected backend.

Supported request-default fields are:

  • context
  • thread_id
  • state
  • rails
  • llm_params
  • llm_output
  • output_vars
  • log

These are backend request options, not additional NeMo Relay-managed execution surfaces.

This includes fields whose names overlap with top-level managed surfaces:

FieldMeaning
Top-level inputManaged NeMo Relay LLM input surface
request_defaults.rails.inputBackend pass-through rail selection
Top-level outputManaged NeMo Relay LLM output surface
request_defaults.rails.outputBackend pass-through rail selection
Top-level tool_inputManaged NeMo Relay tool-input surface in the plugin model; not supported by the current stock-remote backend
request_defaults.rails.tool_inputBackend pass-through rail selection
Top-level tool_outputManaged NeMo Relay tool-output surface
request_defaults.rails.tool_outputBackend pass-through rail selection

The rails section can include:

  • input
  • output
  • retrieval
  • dialog
  • tool_output
  • tool_input

Those values are forwarded to the backend as request semantics. They do not mean NeMo Relay owns separate managed retrieval or dialog execution surfaces. dialog and retrieval are pass-through request options only. Likewise, request_defaults.rails.tool_input is only a backend pass-through selector. It does not make managed remote tool_input supported in the stock-remote lane.

For more targeted request-time pass-through, the remote backend also forwards selectors like these:

1[components.config.request_defaults.rails]
2input = true
3output = true
4retrieval = ["retrieve_relevant_chunks"]
5dialog = true
6tool_output = ["validate_tool_output"]

This richer selector shape demonstrates how request-time Guardrails semantics can be forwarded even when NeMo Relay does not own a separate native managed surface for that category.

Observability

The current remote backend emits coarse backend-level marks for remote Guardrails activity:

  • nemo_guardrails.remote.start
  • nemo_guardrails.remote.end
  • nemo_guardrails.remote.error

These marks cover managed LLM remote execution and managed tool-result checks.