Skip to content

Fix Mem0 metadata validation error and improve auto_memory_wrapper example#1683

Merged
rapids-bot[bot] merged 2 commits intoNVIDIA:release/1.5from
ericevans-nv:fix/auto-memory-wrapper-mem0-metadata
Feb 27, 2026
Merged

Fix Mem0 metadata validation error and improve auto_memory_wrapper example#1683
rapids-bot[bot] merged 2 commits intoNVIDIA:release/1.5from
ericevans-nv:fix/auto-memory-wrapper-mem0-metadata

Conversation

@ericevans-nv
Copy link
Contributor

@ericevans-nv ericevans-nv commented Feb 27, 2026

Description

Fix a ValidationError in the Mem0 memory editor when the Mem0 API returns null for
the metadata field in search results. The MemoryItem model expects a dict, but
res.pop("metadata", {}) returns None when the key exists with a null value, causing
Pydantic validation to fail.

Additionally:

  • Remove the Phoenix tracing exporter from config_zep.yml to eliminate noisy connection
    errors for users without a local Phoenix server
  • Add config_mem0.yml as an alternative example config for users who do not have access
    to a Zep API key
  • Update the auto_memory_wrapper README to document Mem0 as an alternative memory backend

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Added support for Mem0 as an alternative memory backend with example configs and setup guidance.
  • Bug Fixes

    • Improved robustness of metadata handling in memory operations.
  • Documentation

    • Updated examples and docs to include Mem0 options and run commands; removed deprecated Phoenix tracing config and fixed a tutorial reference link.

Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
@ericevans-nv ericevans-nv self-assigned this Feb 27, 2026
@ericevans-nv ericevans-nv requested a review from a team as a code owner February 27, 2026 21:14
@ericevans-nv ericevans-nv added improvement Improvement to existing functionality non-breaking Non-breaking change labels Feb 27, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2dd77b6 and 66349bd.

📒 Files selected for processing (1)
  • docs/source/get-started/tutorials/create-a-new-workflow.md
✅ Files skipped from review due to trivial changes (1)
  • docs/source/get-started/tutorials/create-a-new-workflow.md

Walkthrough

Adds Mem0 as an alternative memory backend for the auto_memory_wrapper example (docs and new config), removes Phoenix tracing from the Zep config, and makes a defensive null-handling change in Mem0 editor metadata extraction.

Changes

Cohort / File(s) Summary
Docs / Example README
examples/agents/auto_memory_wrapper/README.md
Added Mem0 usage guidance, API key setup block, updated "Running the Example" and Examples sections to include Mem0 alongside Zep.
Example Configs
examples/agents/auto_memory_wrapper/configs/config_mem0.yml, examples/agents/auto_memory_wrapper/configs/config_zep.yml
Added config_mem0.yml defining telemetry, nim_llm, mem0_memory backend, tools, ReAct agent, and auto-memory workflow. Removed Phoenix tracing config from config_zep.yml.
Implementation
packages/nvidia_nat_mem0ai/src/nat/plugins/mem0ai/mem0_editor.py
Changed metadata extraction from res.pop("metadata", {}) to res.pop("metadata", None) or {} to avoid None-valued metadata causing downstream issues.
Docs / Tutorial Link
docs/source/get-started/tutorials/create-a-new-workflow.md
Updated DOCA GPUNetIO reference URL to correct capitalization/path.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main changes: fixing a Mem0 metadata validation error and adding Mem0 example configuration to improve the auto_memory_wrapper example.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@willkill07 willkill07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a config_mem0.yml example :)

Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
@ericevans-nv ericevans-nv force-pushed the fix/auto-memory-wrapper-mem0-metadata branch from a324c0b to 66349bd Compare February 27, 2026 21:40
@AnuradhaKaruppiah
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit b099e01 into NVIDIA:release/1.5 Feb 27, 2026
15 checks passed
Charlie-Yi-2002 pushed a commit to Charlie-Yi-2002/NeMo-Agent-Toolkit that referenced this pull request Mar 5, 2026
…ample (NVIDIA#1683)

Fix a `ValidationError` in the Mem0 memory editor when the Mem0 API returns `null` for
the `metadata` field in search results. The `MemoryItem` model expects a `dict`, but
`res.pop("metadata", {})` returns `None` when the key exists with a `null` value, causing
Pydantic validation to fail.

Additionally:
- Remove the Phoenix tracing exporter from `config_zep.yml` to eliminate noisy connection
  errors for users without a local Phoenix server
- Add `config_mem0.yml` as an alternative example config for users who do not have access
  to a Zep API key
- Update the auto_memory_wrapper README to document Mem0 as an alternative memory backend

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing/index.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.



## Summary by CodeRabbit

* **New Features**
  * Added support for Mem0 as an alternative memory backend with example configs and setup guidance.

* **Bug Fixes**
  * Improved robustness of metadata handling in memory operations.

* **Documentation**
  * Updated examples and docs to include Mem0 options and run commands; removed deprecated Phoenix tracing config and fixed a tutorial reference link.

Authors:
  - Eric Evans II (https://github.com/ericevans-nv)

Approvers:
  - Will Killian (https://github.com/willkill07)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: NVIDIA#1683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants