Hacker News new | past | comments | ask | show | jobs | submit

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

https://github.com/mem0ai/mem0
loading story #41451230
Over time, I can imagine there's going to be a lot of sensitive information being stored. How are you handling privacy?
We already support the feature of inclusion and exclusion of memories where the developer can control what things to remember vs not remember for their AI app/agent. For example, you can specify something like this:

- Inclusion prompt: User's travel preferences and food choices - Exclusion prompt: Credit card details, passport number, SSN etc.

Although we definitely think that there is scope to make it better and we are actively working on it. Please let us know if you have feedback/suggestions. Thanks!

An exclusion... prompt? Do you just rely on the LLM to follow instructions perfectly?
loading story #41470579
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.

This is why in my system I have more specific, falsifiable metrics: freshness, confidence, etc. which come together to create a fitness score at the surface-level, while still exposing individual metrics in the API.
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?
Mem0 currently handles outdated or irrelevant memories by:

1. Automatically deprioritizing older memories when new, contradictory information is added. 2. Adjusting memory relevance based on changing contexts.

We're working on improving this system to give developers more control. Future plans include:

1. Time-based decay of unused memories 2. Customizable relevance scoring 3. Manual removal options for obsolete information

These improvements aim to create a more flexible "forgetting" mechanism, allowing AI applications to maintain up-to-date and relevant knowledge bases over time.

We're open to user feedback on how to best implement these features in practical applications.

loading story #41455058
loading story #41482674
loading story #41454958
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.

Thanks yding! Definitely agree with the feedback here. We have seen similar things when talking to developers where they want:

- Control over what to remember/forget - Ability to set how detailed memories should be (some want more detailed vs less detailed) - Different structure of the memories based on the use case

loading story #41449916
Great product, thanks for releasing it for the opensource community. Have you considered replacing Neo4j with something more cost-effective like Memgraph?
loading story #41449429
Thanks for the feedback! Yes, we are definitely planning to add support for other graph datastores including Memgraph and others.
Does the structure of data & query patterns required demand a graph store for acceptable performance? Would a Postgres-based triplestore & recursive CTE’s suck badly?
Yes, it won't scale well. I have used postgres exactly the way you specified in my past job and it didn't scale well after a certain point.
loading story #41450497
Looks interesting but curious to know how is it different from using traditional databases or vector databases? Is that the graph element?
Thanks for your question!

Vector databases are typically used for storing embeddings and are great for tasks like similarity search. However, they are generally read-only and don't natively support the concept of time or state transitions. Let's take an example of tracking state of a tasks from your todo list in a vector database:

You might store the task's states like:

Task 1 in backlog Task 1 in progress Task 1 in canceled

But there's no concept of "latest state" or memory of how the task evolved over time. You'd have to store multiple versions and manually track changes.

With a memory-enabled system like Mem0, you could track: Task 1 (current state: in progress) with a memory of previous states (backlog, canceled, etc). This gives your AI app more stateful understanding of the world, allowing it to update and reflect the current context automatically.

Traditional databases, on the other hand, are designed for structured, relational data with fixed schemas, like customer information in a table. These are great for handling transactional data but aren't optimal for cases where the data is unstructured.

As mentioned in the post, we use a hybrid datastore approach that handles these cases effectively and that's where the graph aspect comes into picture.

loading story #41454610
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?
Hey, yes. It remembers whatever is important from the previous chats.
I'm looking to use, or build, a system that memorizes conversations and stores them in the RAG system. Example conversation:

==== Bot: wassup?

Me: I have some more thoughts on Project X. They will be rambly so please also create an edited version as well as the usual synopsis. I will say 'I'm finished' when I've finished.

Bot: ok hit me

Me: bla bla bla bla etc etc. I'm finished.

Bot: this looks like part of the introduction text of Project X, is that correct?

Me: yes. What meta tags do you suggest? Etc ====

I'm assuming that a custom GPT or equivalent is necessary to set out the 'terms of engagement' and agent objectives. Can you offer any advice about building such a system, and how mem0 could help?

loading story #41454498
loading story #41452316
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.
Hey, Deshraj from Mem0 team. Right now you cannot change the “user” you are chatting as yet but we can definitely make it happen. Will ship this update later today. :)
@staranjeet we should get you plugged in as part of persistence with https://github.com/dagworks-inc/burr !
Hey, that would be great. Lets chat
loading story #41453855
Congrats on the launch!

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

Thanks for the question. Here's how Mem0 differs from ChatGPT memory:

1. LLM Compatibility: Mem0 works with various AI providers (OpenAI, Anthropic, Groq, etc.), while ChatGPT memory is tied to OpenAI's models only.

2. Target Audience: Mem0 is built for developers creating AI applications, whereas ChatGPT memory is for ChatGPT users.

3. Quality and Performance: Our evaluations show Mem0 outperforms ChatGPT memory in several areas:

    - Consistency: Mem0 updates memories more reliably across multiple instances.

    - Reliability: ChatGPT memory can be inconsistent with the same prompts, while Mem0 aims for more consistent performance.

    - Speed: Mem0 typically creates memories in about 2 seconds, compared to ChatGPT's 30-40 seconds to reflect new memories.
4. Flexibility: Mem0 offers more customization options for developers, allowing better integration into various AI applications.

These differences make Mem0 a better choice for developers building AI apps that need efficient memory capabilities.

loading story #41448666
loading story #41454995
10/10 name

makes me nostalgic for ChatScript's fact triples

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.

Thanks for your question! Currently, we process data in the US and are not yet fully GDPR-compliant, but we're actively working on it. We also plan to offer a Europe-based data processing option soon. Your feedback on this is welcome!
loading story #41448793
loading story #41453664
how it is different from Calude prompt caching ?
Thanks for your question!

Claude Prompt Caching and Mem0's memory system have several key differences:

1. Purpose and duration: Claude's cache is designed for short-term memory, clearing every 5 minutes. In contrast, Mem0 is built for long-term information storage, retaining data indefinitely unless instructed otherwise. 2. Flexibility and control: Mem0 offers more flexibility, allowing developers to update, delete, or modify stored information as needed. Claude's cache is more static - new information creates additional entries rather than updating existing ones. 3. Content management: Claude has minimum length requirements for caching (1024 characters for Sonnet, 2048 for Haiku). Mem0 can handle information of any length, from short facts to longer contexts. 4. Customization: Developers have greater control over Mem0's memory management, including options for prioritizing or deprioritizing information based on relevance or time. Claude's caching system offers less direct control. 5. Information retrieval: Mem0 is designed for more precise and targeted information retrieval, while Claude's cache works with broader contextual blocks.

These differences reflect the distinct purposes of each system. Claude's cache aims to maintain recent context in ongoing conversations, while Mem0 is built to serve as a flexible, long-term knowledge base for AI applications.

loading story #41448019
loading story #41450724
loading story #41450174
loading story #41448057
loading story #41447938
loading story #41447954
loading story #41447441
loading story #41455172
loading story #41447571
loading story #41447640
loading story #41447988
loading story #41448802
loading story #41453434