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
      • Python Library Reference
        • nemo_relay
        • adaptive
        • codecs
        • guardrails
        • integrations
        • intercepts
        • llm
        • observability
        • plugin
        • scope
        • scope_local
        • subscribers
        • tools
        • typed
        • utils
      • Node.js Library Reference
      • Rust Library Reference
    • 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
  • Classes
  • ConfigDiagnostic(TypedDict)
  • ConfigReport(TypedDict)
  • ConfigPolicy
  • Methods
  • to_dict
  • BackendSpec
  • Methods
  • in_memory
  • redis
  • to_dict
  • StateConfig
  • Methods
  • to_dict
  • TelemetryConfig
  • Methods
  • to_dict
  • AdaptiveHintsConfig
  • Methods
  • to_dict
  • ToolParallelismConfig
  • Methods
  • to_dict
  • AcgStabilityThresholds
  • Methods
  • to_dict
  • AcgConfig
  • Methods
  • to_dict
  • AdaptiveConfig
  • Methods
  • to_dict
  • ComponentSpec
  • Methods
  • to_dict
  • AdaptiveRuntime
  • Methods
  • AdaptiveRuntime
  • register
  • deregister
  • shutdown
  • wait_for_idle
  • report
  • bind_scope
  • build_cache_request_facts
  • Functions
  • validate_config
  • build_cache_telemetry_event
  • set_latency_sensitivity
  • Type Aliases And Constants
ReferenceAPIsPython Library Reference

nemo_relay.adaptive

||View as Markdown|
Previous

nemo_relay

Next

nemo_relay.codecs

Generated from python/nemo_relay/adaptive.pyi.

Module nemo_relay.adaptive.

Adaptive plugin configuration helpers.

Classes

ConfigDiagnostic(TypedDict)

One adaptive validation diagnostic.

ConfigReport(TypedDict)

Validation report for adaptive configuration.

ConfigPolicy

Policy for unsupported adaptive configuration.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this policy to the canonical JSON object shape.

BackendSpec

Adaptive state backend selection.

Methods

in_memory
1def in_memory() -> 'BackendSpec'

Return an in-memory adaptive backend spec.

redis
1def redis(url: str, key_prefix: str = ...) -> 'BackendSpec'

Return a Redis adaptive backend spec.

to_dict
1def to_dict() -> JsonObject

Serialize this backend spec to the canonical JSON object shape.

StateConfig

Adaptive state configuration.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this state config to the canonical JSON object shape.

TelemetryConfig

Built-in adaptive telemetry subscriber settings.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this telemetry config to the canonical JSON object shape.

AdaptiveHintsConfig

Built-in adaptive hints injection settings.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this adaptive-hints config to the canonical JSON object shape.

ToolParallelismConfig

Built-in adaptive tool scheduling settings.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this tool-parallelism config to the canonical JSON object shape.

AcgStabilityThresholds

Prompt-stability classification thresholds for ACG.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize these ACG stability thresholds to the canonical JSON object shape.

AcgConfig

Adaptive Cache Governor settings.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this ACG config to the canonical JSON object shape.

AdaptiveConfig

Canonical config document for the top-level adaptive component.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this adaptive config to the canonical JSON object shape.

ComponentSpec

Top-level adaptive component wrapper.

Methods

to_dict
1def to_dict() -> JsonObject

Serialize this component to the canonical plugin shape.

AdaptiveRuntime

Hosted adaptive runtime wrapper used by external framework integrations.

Methods

AdaptiveRuntime
1def AdaptiveRuntime(config: AdaptiveConfig | JsonObject) -> None

Create an instance.

register
1async def register() -> None

Register the configured adaptive features with NeMo Relay.

deregister
1def deregister() -> None

Deregister previously registered adaptive features.

shutdown
1async def shutdown() -> None

Deregister the runtime and release its owned resources.

wait_for_idle
1def wait_for_idle() -> None

Block until the adaptive telemetry drain has processed pending work.

report
1def report() -> ConfigReport

Return the validation report associated with this runtime.

bind_scope
1def bind_scope(scope_handle: ScopeHandle) -> None

Bind this runtime’s ACG request rewriting to an active scope.

build_cache_request_facts
1def build_cache_request_facts(*, provider: str, request_id: str, annotated_request: object, agent_id: str, timestamp: str | None = ...) -> JsonObject | None

Build cache-diagnostics facts for an annotated request.

Functions

validate_config

1def validate_config(config: AdaptiveConfig | JsonObject) -> ConfigReport

Validate an adaptive config document without constructing a runtime.

build_cache_telemetry_event

1def build_cache_telemetry_event(*, provider: str, request_id: str, usage: JsonObject | None = ..., request_facts: JsonObject | None = ..., agent_id: str, template_version: str, toolset_hash: str, model_family: str, tenant_scope: str, timestamp: str | None = ...) -> JsonObject | None

Build one canonical cache telemetry event from usage plus request facts.

set_latency_sensitivity

1def set_latency_sensitivity(level: int) -> None

Set a request-local latency-sensitivity hint.

Type Aliases And Constants

  • ADAPTIVE_PLUGIN_KIND