Skip to content

Add Memgraph integration #2537

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

Merged
merged 7 commits into from
Apr 22, 2025
Merged

Conversation

katarinasupe
Copy link
Contributor

@katarinasupe katarinasupe commented Apr 11, 2025

Description

  • To make this work, I added a new dependency: langchain-memgraph and added it to [tool.poetry.extras] graph. I didn't add changes to poetry.lock here - not sure if you prefer that or not.
  • I added the initial version of Memgraph integration. Please provide feedback on where to place this integration. Specifics related to Memgraph integration - I used Memgraph's vector search with cosine similarity metrics directly (it is a built-in Memgraph feature), instead of calculating cosine similarity with Cypher. I also created indexes in the beginning to ensure better performance.
  • I created an example Jupyter Notebook to test the usage.
  • I updated your documentation to offer Memgraph next to Neo4j as Graph Memory. The example usage can stay the same. I didn't add TypeScript config as I am not sure how you handle TS project next to the Python one.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • Test Script (Jupyter Notebook)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@CLAassistant
Copy link

CLAassistant commented Apr 11, 2025

CLA assistant check
All committers have signed the CLA.

@katarinasupe katarinasupe marked this pull request as ready for review April 17, 2025 07:55
Copy link
Contributor

@Dev-Khant Dev-Khant left a comment

Choose a reason for hiding this comment

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

Can you please add memgraph package in MAKEFILE so that CI tests can pass?

"username": "memgraph",
"password": "xxx"
},
"llm" : {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you remove this llmas it's mentioned above again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated it to the config that works for me in the notebook. Let me know if that's okay

@katarinasupe
Copy link
Contributor Author

Can you please add memgraph package in MAKEFILE so that CI tests can pass?

@Dev-Khant can you elaborate where exactly? Which MAKEFILE and what's needed?

@Dev-Khant
Copy link
Contributor

Hey @katarinasupe You will have to add langchain-memgraph here https://github.com/mem0ai/mem0/blob/main/Makefile#L17

@katarinasupe katarinasupe requested a review from Dev-Khant April 17, 2025 12:32
@Dev-Khant
Copy link
Contributor

Hey @katarinasupe can you check why the tests are failing?

@katarinasupe
Copy link
Contributor Author

Hey @katarinasupe can you check why the tests are failing?

I think it was related to poetry lock. I pushed the changes now. Let me know if that works @Dev-Khant

@Dev-Khant
Copy link
Contributor

@katarinasupe Thanks for the contribution!!

@Dev-Khant Dev-Khant merged commit ba2e479 into mem0ai:main Apr 22, 2025
7 of 8 checks passed
rohankatakam pushed a commit to jean-technologies/jean-memory that referenced this pull request Jun 22, 2025
merlinfrombelgium pushed a commit to merlinfrombelgium/mem0 that referenced this pull request Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants