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
          • storage
            • erased
            • memory
            • traits
              • StorageBackend
              • StorageBackendDyn
          • 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
  • Required Methods
  • store_run_dyn
  • load_plan_dyn
  • list_runs_dyn
  • store_trie
  • load_trie
  • store_accumulators
  • load_accumulators
  • Provided Methods
  • store_plan
  • Notes
  • store_observations
  • Notes
  • load_observations
  • Notes
  • store_stability
  • Notes
  • load_stability
  • Notes
  • Implementors
  • impl StorageBackendDyn for RedisBackend
  • impl StorageBackendDyn for InMemoryBackend
ReferenceAPIsRust Library Referencenemo-relay-adaptivestoragetraits

Trait Storage Backend Dyn

||View as Markdown|
Previous

Trait Storage Backend

Next

Module subscriber

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

pub trait StorageBackendDyn:
    Send
    + Sync
    + 'static {
    // Required methods
    fn store_run_dyn<'a>(
        &'a self,
        record: &'a RunRecord,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
    fn load_plan_dyn<'a>(
        &'a self,
        agent_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>;
    fn list_runs_dyn<'a>(
        &'a self,
        agent_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>;
    fn store_trie<'a>(
        &'a self,
        agent_id: &'a str,
        envelope: &'a TrieEnvelope,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
    fn load_trie<'a>(
        &'a self,
        agent_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>;
    fn store_accumulators<'a>(
        &'a self,
        agent_id: &'a str,
        state: &'a AccumulatorState,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
    fn load_accumulators<'a>(
        &'a self,
        agent_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>;
​
    // Provided methods
    fn store_plan(&self, _plan: &ExecutionPlan) -> Result<()> { ... }
    fn store_observations<'a>(
        &'a self,
        _agent_id: &'a str,
        _observations: &'a [PromptIR],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>> { ... }
    fn load_observations<'a>(
        &'a self,
        _agent_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>> { ... }
    fn store_stability<'a>(
        &'a self,
        _agent_id: &'a str,
        _result: &'a StabilityAnalysisResult,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>> { ... }
    fn load_stability<'a>(
        &'a self,
        _agent_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<StabilityAnalysisResult>>> + Send + 'a>> { ... }
}

Object-safe storage interface used by the adaptive runtime.

Backends implement this trait when they need to be stored behind trait objects and accessed through dynamic dispatch.

Required Methods

store_run_dyn

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

Persist one observed run.

load_plan_dyn

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

Load the current execution plan for an agent.

list_runs_dyn

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

List stored runs for an agent.

store_trie

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

Persist a serialized prediction trie for an agent.

load_trie

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

Load the serialized prediction trie for an agent.

store_accumulators

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

Persist trie accumulator state for an agent.

load_accumulators

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

Load trie accumulator state for an agent.

Provided Methods

store_plan

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

Persist an execution plan for an agent.

Notes

The default implementation is a no-op for backends that do not persist plans.

store_observations

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

Persist prompt IR observations for an agent or derived Adaptive Cache Governor (ACG) profile.

Notes

The default implementation is a no-op.

load_observations

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

Load prompt IR observations for an agent or derived Adaptive Cache Governor (ACG) profile.

Notes

The default implementation returns Ok(None).

store_stability

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

Persist an ACG stability result for an agent or derived profile.

Notes

The default implementation is a no-op.

load_stability

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

Load an ACG stability result for an agent or derived profile.

Notes

The default implementation returns Ok(None).

Implementors

impl StorageBackendDyn for RedisBackend

impl StorageBackendDyn for RedisBackend

impl StorageBackendDyn for InMemoryBackend

impl StorageBackendDyn for InMemoryBackend