MemorySync
Getting Started

NeMo Agent Toolkit Memory

A MemoryEditor for the NVIDIA NeMo Agent Toolkit: one YAML block gives any workflow long-term memory — through the built-in memory tools or fully automatic via auto_memory_agent — with per-fact scored recall, session-scoped deletes, and a hard recall budget. Install nat-memorysync from PyPI.

What installs

pip install nat-memorysync

Installing the package registers _type: memorysync_memory through the toolkit’s nat.components entry point — a real pip-installable plugin. The toolkit’s own Mem0 and Zep editors live in its repo as example code, and both have sharp edges this editor is engineered against:

Mem0 (in-repo editor)Zep (in-repo editor)SupermemoryMemorySync
Packaging✗ example code in NVIDIA’s repo✗ example code in NVIDIA’s repo— nothing at all✓ pip-installable entry-point plugin
search() without user_id✗ bare KeyError— thread-scopedValueError naming the kwarg
Multi-user isolationper-call user_id✗ everyone shares `"default_zep_thread"` when no conversation id is set✓ rows always keyed by item user_id — bleed impossible
Your metadata dict after add_itemsmutated — keys popped out✓ untouched (copy-first, tested)
Search result shape✗ items, scores discardedone joined text blob✓ one MemoryItem per fact, similarity_score populated
remove_items() with no kwargssilent no-opdeletes the current thread✓ raises — refuses to guess
Delete blast radius✗ whole user✗ whole thread✓ session-scoped by default; whole user is an explicit scope="user" opt-in
Slow or down backend✗ blocks the turn✗ blocks the turn✓ 1.2s recall budget, fail-open both directions

Fully automatic memory — auto_memory_agent

The toolkit ships an auto_memory_agent wrapper (in nvidia-nat-langchain) that stores every turn and enriches every prompt automatically — no tools, no prompt changes. It is backend-agnostic, so it drives this editor out of the box:

memory:
saas_memory:
_type: memorysync_memory
workflow:
_type: auto_memory_agent
augmented_fn: my_actual_workflow
memory: saas_memory

Because search runs on every response in this mode, it waits at most recall_timeout (default 1.2s) and fails open to no memories — automatic memory can never stall a turn. Writes are fail-open too, and deterministic idempotency seeds make the toolkit’s RetryMixin retries converge on one stored row instead of duplicating.

Deletes that cannot nuke a customer

remove_items refuses to guess: called with no kwargs it raises (the in-repo Mem0 editor silently does nothing — you believe data was deleted and it was not). With user_id it deletes only this adapter’s session rows; wiping the user’s entire memory requires the explicit scope="user" opt-in.

CallWhat is deleted
remove_items()Nothing — raises ValueError (refuses to guess)
remove_items(user_id="u1")This adapter’s current session rows for u1 only
remove_items(user_id="u1", memory_id="m1")One specific memory row
remove_items(user_id="u1", scope="user")All of u1’s memories — explicit opt-in

Configuration

YAML fieldDefaultMeaning
api_keyMEMORYSYNC_API_KEY env varKeep it in the env var so workflow YAML stays credential-free
base_urlhttps://api.memorysync.ioOverride for staging
project_idOptional X-Project-ID header
top_k5Default memories per search
recall_timeout1.2Hard recall budget in seconds
min_query_chars8Skip recall for trivial queries
sourcenatSource label on stored turns
num_retries, retry_on_status_codes, …toolkit defaultsRetryMixin knobs — safe here because writes are idempotent

Supported versions

SurfaceRequiresVerified on
nat-memorysync 1.0.0nvidia-nat-core 1.5+ (Python 3.11+, the toolkit’s own floor)26 CI checks against the latest nvidia-nat-core: the REAL WorkflowBuilder round-trip and NVIDIA’s real add_memory/get_memory tool functions driving this editor end to end — per-fact scored results, caller-mutation safety, the loud ValueError contracts, session-scoped vs scope="user" deletes, bleed-safe user_id keying, the 1.2s budget, seed idempotency, and both monthly-quota server modes

Where to go next

Was this page helpful?