-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Update Mem0Storage to support v2 API with run_id parameter #2777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: Joe Moura <joao@crewai.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #2777: Mem0Storage V2 API SupportOverviewThe implementation of support for v2 API in the Code Quality Findings1.
|
Co-Authored-By: Joe Moura <joao@crewai.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, notice if you provide run_id
, that means you create short-term memory for a user session and no long-term memory is created - mem0 docs.
You should rather call memory.add()
twice, once with run_id
for short-term session memory and once without run_id
for long-term memory.
Secondly, there is no ability to turn off agent memories. The agent name is always being passed as agent ID with every add API call, but in some situations, it is necessary that agents are memory-less.
Thirdly, it would be cool to have support for mem0 new features such as memory inclusion, custom categories, custom instructions, etc. - at the project (mem0 client) level and every add API call.
UPD: sorry this regards short-term and long-term memory with mem0 (not external) |
Update Mem0Storage to support v2 API with run_id parameter
Description
This PR updates the Mem0Storage class to support Mem0's v2 API, which includes support for memories associated with specific conversation sessions using the
run_id
parameter.Changes
Related Issue
Fixes #2776
Link to Devin run
https://app.devin.ai/sessions/e4382d66a48f4e0b9b49c323ce534c9a
Requested by
Joe Moura (joao@crewai.com)
Example Usage