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) | Supermemory | MemorySync | |
|---|---|---|---|---|
| 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-scoped | — | ✓ ValueError naming the kwarg |
| Multi-user isolation | per-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_items | ✗ mutated — keys popped out | ✓ | — | ✓ untouched (copy-first, tested) |
| Search result shape | ✗ items, scores discarded | ✗ one joined text blob | — | ✓ one MemoryItem per fact, similarity_score populated |
remove_items() with no kwargs | ✗ silent no-op | deletes 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_memoryworkflow:_type: auto_memory_agentaugmented_fn: my_actual_workflowmemory: 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.
| Call | What 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 field | Default | Meaning |
|---|---|---|
api_key | MEMORYSYNC_API_KEY env var | Keep it in the env var so workflow YAML stays credential-free |
base_url | https://api.memorysync.io | Override for staging |
project_id | — | Optional X-Project-ID header |
top_k | 5 | Default memories per search |
recall_timeout | 1.2 | Hard recall budget in seconds |
min_query_chars | 8 | Skip recall for trivial queries |
source | nat | Source label on stored turns |
num_retries, retry_on_status_codes, … | toolkit defaults | RetryMixin knobs — safe here because writes are idempotent |
Supported versions
| Surface | Requires | Verified on |
|---|---|---|
nat-memorysync 1.0.0 | nvidia-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 |