-
Notifications
You must be signed in to change notification settings - Fork 7k
Add mem0 Memory Implementation #6510
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
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
@microsoft-github-policy-service agree |
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.
Thanks for the PR! Could you add unit tests so we can ensure the correctness of the features?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6510 +/- ##
========================================
Coverage 79.77% 79.77%
========================================
Files 228 229 +1
Lines 17054 17204 +150
========================================
+ Hits 13605 13725 +120
- Misses 3449 3479 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for replying 🚀 Unit test added: https://github.com/alpha-xone/autogen/actions/runs/14992498495 |
Thanks for adding the tests. Can we use the open source verison of mem0? I think it can run entirely locally. |
Yes we can. I'm running it locally with the combination of neo4j for graph storage + chromadb for vector db + SQLite for historical db. All we need to do is setup the local environment and pass a dict of configurations of these in. But for unit testing, I'm not sure how to make these environments ready to test. |
For SQLite and Chroma DB, I think you can instantiate directly as test fixture, right? See example on For Neo4j, there should be github actions that can set this up in CI. For local integration test, we can skip it if no neo4j server is running. Besides all these above, I thought mem0's can run independently as in-memory python code? That's my impression reading their documentation. https://docs.mem0.ai/open-source/python-quickstart#basic |
The
I can only test locally with the same config in the |
@alpha-xone, your PR should update
Hopefully this will fix most of the remaining errors. |
Thanks a lot for the detailed instructions. I'm trying the fixes and hopefully can fix in few days. |
I tried the above steps, and I've uploaded the Is it possible to run the tests online again and I tried to look where to fix? Thanks |
Sure, if you push a change to the branch, I'll approve the checks to be run again. |
Great, thanks. Could you approve current branch pls - there is no update to main button now - I think there's no change since my last upload. There could be some time to fix CIs. Thanks |
There's no button for me to approve the check workflow right now, because you haven't pushed any changes since the last time it ran. |
Should be able to approve now: Fixed the bug in |
Not sure I understand. No PR can be approved or merged until none of the checks fail. For instance, PR #6622 passes the checks and is awaiting approval. |
finally! all checks passed! The problem was: |
That's great! Do you have recommendations for the |
Sure. On top of the 5 steps above, just add two versions below.
Note: need to read the exact versions from main. |
I'll try to run the code and finish reviewing the PR this week. Thanks @alpha-xone ! |
Thanks for running the CIs. I saw the conflicts in these two files:
|
Requested change was made, but reviewer is on vacation.
<!-- Thank you for your contribution! Please review https://microsoft.github.io/autogen/docs/Contribute before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? These changes are needed to expand AutoGen's memory capabilities with a robust, production-ready integration with Mem0.ai. <!-- Please give a short summary of the change and the problem this solves. --> This PR adds a new memory component for AutoGen that integrates with Mem0.ai, providing a robust memory solution that supports both cloud and local backends. The Mem0Memory class enables agents to store and retrieve information persistently across conversation sessions. ## Key Features - Seamless integration with Mem0.ai memory system - Support for both cloud-based and local storage backends - Robust error handling with detailed logging - Full implementation of AutoGen's Memory interface - Context updating for enhanced agent conversations - Configurable search parameters for memory retrieval ## Related issue number <!-- For example: "Closes microsoft#1234" --> ## Checks - [x] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [ ] I've made sure all auto checks have passed. --------- Co-authored-by: Victor Dibia <victordibia@microsoft.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> Co-authored-by: Ricky Loynd <riloynd@microsoft.com>
Why are these changes needed?
These changes are needed to expand AutoGen's memory capabilities with a robust, production-ready integration with Mem0.ai.
This PR adds a new memory component for AutoGen that integrates with Mem0.ai, providing a robust memory solution that supports both cloud and local backends. The Mem0Memory class enables agents to store and retrieve information persistently across conversation sessions.
Key Features
Related issue number
Checks