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
      • Node.js Library Reference
      • Rust Library Reference
        • nemo-relay
        • nemo-relay-adaptive
          • acg
          • acg_component
          • acg_learner
          • acg_profile
          • adaptive_hints_intercept
          • cache_diagnostics
          • config
          • context_helpers
          • drain
          • error
          • intercepts
          • learner
          • plugin_component
          • redis
            • RedisBackend
          • storage
          • subscriber
          • tool_parallelism_learner
          • trie
          • types
          • AdaptiveRuntime
        • nemo-relay-ffi
    • 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
  • Implementations
  • impl RedisBackend
  • new
  • Arguments
  • Errors
  • Trait Implementations
  • impl StorageBackend for RedisBackend
  • store_run
  • load_plan
  • list_runs
  • impl StorageBackendDyn for RedisBackend
  • store_run_dyn
  • load_plan_dyn
  • list_runs_dyn
  • store_trie
  • load_trie
  • store_accumulators
  • load_accumulators
  • store_plan
  • store_observations
  • load_observations
  • store_stability
  • load_stability
ReferenceAPIsRust Library Referencenemo-relay-adaptiveredis

Struct Redis Backend

||View as Markdown|
Previous

Module redis

Next

Module storage

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

1pub struct RedisBackend { /* private fields */ }

A Redis-backed storage backend for cross-process shared state.

Uses [ConnectionManager] which is Clone (internally Arc-based) and automatically reconnects on transient failures. Trie persistence uses an atomic single JSON blob SET - no partial update is possible.

Implementations

impl RedisBackend

impl RedisBackend

new

pub async fn new(url: &str, key_prefix: impl Into<String>) -> Result<Self>

Connect to Redis and return a new RedisBackend.

Arguments
  • url - Redis connection URL (e.g. redis://127.0.0.1:6379).
  • key_prefix - String prepended to every Redis key (e.g. "nemo_relay:").
Errors

Returns AdaptiveError::Storage if the client cannot be created or the connection cannot be established.

Trait Implementations

impl StorageBackend for RedisBackend

impl StorageBackend for RedisBackend

store_run

fn store_run(
    &self,
    record: &RunRecord,
) -> impl Future<Output = Result<()>> + Send

load_plan

fn load_plan(
    &self,
    agent_id: &str,
) -> impl Future<Output = Result<Option<ExecutionPlan>>> + Send

list_runs

fn list_runs(
    &self,
    agent_id: &str,
) -> impl Future<Output = Result<Vec<RunRecord>>> + Send

impl StorageBackendDyn for RedisBackend

impl StorageBackendDyn for RedisBackend

store_run_dyn

fn store_run_dyn<'a>(
    &'a self,
    record: &'a RunRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

load_plan_dyn

fn load_plan_dyn<'a>(
    &'a self,
    agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>

list_runs_dyn

fn list_runs_dyn<'a>(
    &'a self,
    agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>

store_trie

fn store_trie<'a>(
    &'a self,
    agent_id: &'a str,
    envelope: &'a TrieEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

load_trie

fn load_trie<'a>(
    &'a self,
    agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>

store_accumulators

fn store_accumulators<'a>(
    &'a self,
    agent_id: &'a str,
    state: &'a AccumulatorState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

load_accumulators

fn load_accumulators<'a>(
    &'a self,
    agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>

store_plan

fn store_plan(&self, plan: &ExecutionPlan) -> Result<()>

store_observations

fn store_observations<'a>(
    &'a self,
    agent_id: &'a str,
    observations: &'a [PromptIR],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

load_observations

fn load_observations<'a>(
    &'a self,
    agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>>

store_stability

fn store_stability<'a>(
    &'a self,
    agent_id: &'a str,
    result: &'a StabilityAnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

load_stability

fn load_stability<'a>(
    &'a self,
    agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<StabilityAnalysisResult>>> + Send + 'a>>