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
  • Start Here When
  • Guides
Build Plugins

About

||View as Markdown|
Previous

Code Examples

Next

Define a Plugin

Use this section when you want to package reusable NeMo Relay behavior as a plugin that can be activated from configuration.

Plugins are the configuration-driven packaging layer for shared runtime behavior. A plugin can validate component-local config, register middleware and subscribers through a component-scoped context, and rely on the plugin system to report diagnostics and roll back partial setup when activation fails.

Plugins prevent repeated registration code for policies, request transforms, exporters, and related runtime components. They give shared behavior a stable kind name, a structured config document, and a clear activation lifecycle.

Start Here When

Use these signals to decide whether this documentation path matches your current task.

  • Ship policy bundles across applications
  • Install observability exporters consistently
  • Package framework-agnostic request transforms
  • Validate operator-supplied config before runtime behavior changes

If the behavior applies to only one request or tenant, consider scope-local middleware before turning it into a process-level plugin.

Guides

Use these guide links to move from the overview into task-specific instructions.

  • Define a Plugin explains plugin kinds, shape, runtime ownership, and the activation lifecycle.
  • Validate Plugin Configuration covers JSON-compatible config, validation rules, and structured diagnostics.
  • Plugin Configuration Files documents plugins.toml file discovery, precedence, merge behavior, and editor controls for the CLI gateway.
  • Register Plugin Behavior shows how to initialize config and install subscribers or middleware through PluginContext.
  • Design Plugin Configuration covers validation rules, advanced configuration patterns, rollout controls, and PluginContext usage.
  • NeMo Guardrails Plugin documents the built-in first-party nemo_guardrails component.
  • NeMo Guardrails Example Plugin shows the older external Python example plugin that applies NeMo Guardrails checks around NeMo Relay LLM and tool calls.
  • Code Examples provides patterns for dynamic header injection, subscriber-oriented export, multi-surface bundles, and framework-facing plugins.

Start by deciding which runtime surfaces the plugin owns: middleware, subscribers, or a combination of related runtime behavior. Define the smallest JSON-compatible config that can drive that behavior, validate it before registration, and keep external objects or callables out of the config document.

Use plugins for reusable process-level behavior. Keep request-specific behavior scope-local so it is cleaned up with the owning scope.