Skip to content

Feature: Persistent cross-session memory backend for guardrails context #2049

Description

@tcconnally

Feature Request: Persistent cross-session memory backend for guardrails context

Problem

NeMo Guardrails currently supports conversation memory within a single session. Agents operating across multiple sessions lose context between interactions. There is no built-in mechanism for remembering user preferences across sessions, learning from past guardrail violations, or sharing context between agents.

Proposed Solution

A pluggable persistent memory backend interface:

class PersistentMemoryStore:
    async def remember(self, key: str, content: dict, importance: float) -> str
    async def recall(self, query: str, top_k: int = 5) -> list[dict]
    async def forget(self, key: str) -> None
    async def decay(self) -> None  # Temporal forgetting

Reference Implementation

Mimir (https://github.com/Perseus-Computing-LLC/mimir) provides encrypted persistent memory with decay curves, hybrid search, and conflict detection via 36+ MCP tools.

Integration Points

  1. Remember past guardrail activations to avoid repeated warnings
  2. Store user-specific safety preferences across sessions
  3. Share safety context between distributed agents
  4. Persistent, encrypted audit trail of all guardrail decisions

I'm happy to contribute a PR with the interface + Mimir backend if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions