September 4th, 2024

Show HN: Mem0 – open-source Memory Layer for AI apps

Mem0 is a GitHub project that enhances AI assistants with an intelligent memory layer for personalized interactions, featuring multi-level memory retention, adaptive personalization, and easy installation via pip.

Read original articleLink Icon
ExcitementCuriosityConcern
Show HN: Mem0 – open-source Memory Layer for AI apps

Mem0 is a GitHub project aimed at enhancing AI assistants and agents by incorporating an intelligent memory layer that allows for personalized interactions. Its primary purpose is to improve user engagement by remembering preferences and adapting over time, making it ideal for applications such as customer support chatbots and AI assistants. Key features include multi-level memory retention (User, Session, AI Agent), adaptive personalization, a developer-friendly API, cross-platform consistency, and a managed service for ease of use. Mem0 employs a hybrid database approach to manage long-term memories, organizing them by unique identifiers and facilitating efficient retrieval through methods like `add()`, `search()`, and `get()`. The project has diverse use cases, including AI assistants, personalized learning, customer support, healthcare management, virtual companions, and gaming environments. Installation is straightforward via pip, and basic usage is demonstrated with a simple code example. Additional resources include comprehensive documentation and community support through Discord. Mem0 is licensed under the Apache 2.0 License, and further information can be found on its GitHub repository.

- Mem0 enhances AI interactions with an intelligent memory layer.

- It features multi-level memory retention and adaptive personalization.

- The project supports various applications, including customer support and personalized learning.

- Installation is easy via pip, with a straightforward API for developers.

- Community support and documentation are available for users.

AI: What people are saying
The comments on the Mem0 launch reflect a mix of excitement and curiosity about its features and implications for AI interactions.
  • Users express enthusiasm for the memory layer's potential to enhance AI assistants, addressing a significant pain point in current LLMs.
  • Concerns about long-term support for the open-source version and privacy handling of sensitive information are raised.
  • Questions about the technical aspects, such as the use of graph databases and the management of outdated memories, are common.
  • Some users seek clarification on pricing and how Mem0 compares to existing memory solutions like ChatGPT.
  • Overall, there is a strong interest in how Mem0 can integrate structured and unstructured memory for more effective AI interactions.
Link Icon 39 comments
By @jedwhite - 5 months
Congrats on the launch. Adding a memory layer to LLMs is a real painpoint. I've been experimenting with mem0 and it solves a real problem that I failed to solve myself, and we're going to use it in production.

One question that I've heard a few times now: will you support the open source version as a first class citizen for the long term? A lot of open source projects with a paid version follow a similar strategy. They use the open source repo to get traction, but then the open source version gets neglected and users are eventually pushed to the paid version. How committed are you to supporting the open source version long term?

By @AngelaHoover - 5 months
Over time, I can imagine there's going to be a lot of sensitive information being stored. How are you handling privacy?
By @weisser - 5 months
Congrats on the launch!

I messed around with the playground onboarding...here's the output:

With Memory Mem0.ai I know that you like to collect records from New Orleans artists, and you enjoy running.

Relevancy: 9/10

Without Memory I don’t have any personal information about you. I don’t have the ability to know or remember individual users. My main function is to provide information and answer questions to the best of my knowledge and training. How can I assist you today?

Relevancy: 4/10

--

It's interesting that "With Memory" is 9/10 Relevancy even though it is 100% duplication of what I had said. It feels like that would be 10/10.

It's also interesting that "Without Memory" is 4/10 — it seems to be closer to 0/10?

Curious how you thinking about calculating relevancy.

By @gkorland - 5 months
It looks great! Utilizing Knowledge Graph to store long term memory is probably the most accurate solution compared to using only Vector Store (same as with GraphRAG vs Vector RAG). I think an important thing to point here that long term memory vs RAG doesn't represent the organizational knowledge but the chat history which should be private to the end user and shouldn't be kept in a completely isolated graph than the rest of the users
By @kaybi - 5 months
How does Mem0 handle the potential for outdated or irrelevant memories over time? Is there a mechanism for "forgetting" or deprioritizing older information that may no longer be applicable?
By @asaddhamani - 5 months
I believe AI memory is a very important problem to solve. Our AI tools should get better and more personalised over time.

(I hope it's ok to share something I've built along a similar vein here.)

I wanted to get long-term memory with Claude, and as different tools excel at different use cases, I wanted to share this memory across the different tools.

So I created MemoryPlugin (https://www.memoryplugin.com). It's a very simple tool that provides your AI tools with a list of memories, and instructs them on how to add new memories. It's available as a Chrome extension that works with ChatGPT, Claude, Gemini, and LibreChat, a Custom GPT for ChatGPT on mobile, and a plugin for TypingMind. Think of it as the ChatGPT memory feature, but for all your AI tools, and your memories aren't locked into any one tool but shared across all of them.

This is meant for end-users instead of developers looking to add long-term memory to their own apps.

By @yding - 5 months
Congrats Taranjeet and Deshraj!

So after using Mem0 a bit for a hackathon project, I have sort of two thoughts: 1. Memory is extremely useful and almost a requirement when it comes to building next level agents and Mem0 is probably the best designed/easiest way to get there. 2. I think the interface between structured and unstructured memory still needs some thinking.

What I mean by that is when I look at the memory feature of OpenAI it's obviously completely unstructured, free form text, and that makes sense when it's a general use product.

At the same time, when I'm thinking about more vertical specific use cases up until now, there are very specific things generally that we want to remember about our customers (for example, for advertising, age range, location, etc.) However, as the use of LLMs in chatbots increases, we may want to also remember less structured details.

So the killer app here would be something that can remember and synthesize both structured and unstructured information about the user in a way that's natural for a developer.

I think the graph integration is a step in this direction but still more on the unstructured side for now. Look forward to seeing how it develops.

By @hammer_ai - 5 months
Looks nice. Would the open-source version work from within an Electron app used for local LLM chats? I.e. can I run the memory management, retrieval, and database locally in javascript?

I believe the answer is "no, you can only run the memory management code in Python, the javascript code is only a client SDK for interacting with the managed solution". In which case, no worries, still looks awesome!

By @giovannibonetti - 5 months
Great product, thanks for releasing it for the opensource community. Have you considered replacing Neo4j with something more cost-effective like Memgraph?
By @handfuloflight - 5 months
Could you speak to more about what the pricing is? With the current pricing page, it's hard to model costs against potential use cases.
By @Oras - 5 months
Looks interesting but curious to know how is it different from using traditional databases or vector databases? Is that the graph element?
By @zostale - 5 months
Not sure if I’m seeing a clear value prop here. Why is this something that model provider’s won’t build themselves? Can you link some clear use-cases/killer apps that leverage mem0?
By @aayothered - 5 months
Thanks for the lucid and detailed post and responses. I'm curious whether you imagine this thing developing as a general-purpose scaffolding or something that is more geared towards one form-factor eg. chat-bot, voice-bot
By @ezhang887 - 5 months
Is there any way to change what "user" I am chatting as in the playground? I created some memories in the onboarding process under a specific user, but it seems like my chats in the playground are using a different user.
By @surmenok - 5 months
Congrats! API looks easy to use. Graph memory feature is interesting, seems powerful. Curious if it works well in practice and if it can handle fuzzy/contradictory facts (which is a general problem for symbolic AI).
By @fallinditch - 5 months
Hi this looks interesting. From your description it looks like mem0 remembers details and context of previous chats but not the actual text of chats. Is this a correct assumption?
By @krawczstef - 5 months
@staranjeet we should get you plugged in as part of persistence with https://github.com/dagworks-inc/burr !
By @moneywoes - 5 months
why a graph db, can you please illustrate how it helps
By @golergka - 5 months
Congrats on the launch!

The only AI memory solution I work with every day is ChatGPT memory feature. How does mem0 compares to it?

By @neverproof - 5 months
the hybrid datastore (graph, vector, key-value) seems like a smart way to handle different types of information. But as it scales, how do you plan to manage issues like memory bloat or outdated context? Is there a strategy for pruning irrelevant data to keep the system efficient?

Exciting work overall!

By @bsenftner - 5 months
Looks very over engineered to me.
By @jazzyjackson - 5 months
10/10 name

makes me nostalgic for ChatScript's fact triples

By @FooBarWidget - 5 months
Where do you process your data? Do you have a Europe region? Are you GDPR compliant?

This is my main concern with most AI providers. They are based in the US, with unclear GDPR compliancy, making most of them a non-starter for me.

By @omarshaya - 5 months
Solves a key need to make AI Agents useful!
By @anshulbhide - 5 months
Fantastic launch :)
By @ksx098 - 5 months
how it is different from Calude prompt caching ?
By @kaybi - 5 months
Congratulations to the Mem0 team on your launch! As LLMs continue to advance, with newer models featuring larger context windows and better context retention, how does Mem0 distinguish itself from the memory capabilities that future LLMs might inherently possess?
By @lagniappe - 5 months
What's up with all the flagged comments?
By @omarshaya - 5 months
I enjoyed our collaboration to integrate with our MultiOn agent platform. Try it our if you are building AI Agents for the web.
By @gitroom - 5 months
This is an impressive innovation! Mem0 directly addresses a big problem that many of us have had with present large language models. It seems to me that the addition of a stateful memory layer potentially allows for LLMs that are not only more intelligent but also more efficient and user-friendly, because they can be tailored to individual users. And your design for an open-source, hybrid memory system also seems like a big step forward for the developer community both for the inventiveness of the system itself and for the potential it has for serving as a model for whatever comes next after LLMs.