Skip to content
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

Mem0 Integration: Add mem0 as memory provider for RAG #914

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dev-Khant
Copy link

What does this PR do?

Integrate Mem0 as a memory provider for RAG.

Test Plan

Please describe:

  • Still WIP

Sources

Mem0: https://mem0.ai/
Docs: https://docs.mem0.ai/overview

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Ran pre-commit to handle lint / formatting issues.
  • Read the contributor guideline,
    Pull Request section?
  • Updated relevant documentation.
  • Wrote necessary unit or integration tests.

@facebook-github-bot
Copy link

Hi @Dev-Khant!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@Dev-Khant
Copy link
Author

Hey, reviewers need your help!

So we are integrating Mem0 as memory provider but are facing issue on what should be the best way to do it, as currently there's only support for VectorIO. So if we can get some guidance on what's the best way to do it, then it would be super helpful. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 31, 2025
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@Dev-Khant
Copy link
Author

I also started testing out the feature by starting a local server from this doc: https://llama-stack.readthedocs.io/en/latest/distributions/index.html. But the issue is whenever I make changes to my local it's not reflecting in the running server. How can I fix this?

@Dev-Khant
Copy link
Author

Hi @ashwinb,

I was able to run our provider when I completely run the current MemoryToolRuntimeImpl and it working as intended. So as next step I made changes to the newly created Mem0MemoryToolRuntimeImpl. I tested it with Ollama.

But now the issue while inferencing the mem0 tool is not getting called and the default tool is called for insertion and querying. So can you please help me guide on what changes do I need to make in order to pass and call mem0 tool.

I'm following these docs:

Thanks!

@Dev-Khant
Copy link
Author

Hey @ashwinb Can you please go through the above comments and help me out? Thanks!

@@ -110,3 +113,5 @@ tool_groups:
provider_id: rag-runtime
- toolgroup_id: builtin::code_interpreter
Copy link
Contributor

@ehhuang ehhuang Mar 14, 2025

Choose a reason for hiding this comment

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

Sorry for the late response. The problem is that we don't support multiple providers for
client.tool_runtime.rag_tool.insert:

return await self.routing_table.get_provider_impl("knowledge_search").query(

To support this, we might need to add provider_id as an argument, similar to client.vector_dbs.register for example.

However, I also think it might be time to rework this API client.tool_runtime.rag_tool.insert. Will need some time to think through this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy