-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
base: main
Are you sure you want to change the base?
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 |
…nto mem0-memory
Thanks for merging. Looks like this function was only one missing MagicMock decorator. I've removed environment variables and tried again in CI again - it has passed without keys: https://github.com/alpha-xone/autogen/actions/runs/15406124123 |
That's awesome! Any questions about how to fix and test the format & lint checks etc? The instructions here about uv can be challenging. |
I've tested the format & lint locally with the |
@alpha-xone, the repo currently has an issue with uv versioning, which may be causing a lot of the check failures in the list. I'll try to give you some solution steps soon. |
@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 ! |
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