<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>AI Memory on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/ai-memory/</link>
        <description>Recent content in AI Memory on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Thu, 11 Jun 2026 14:30:23 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/ai-memory/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>How to Choose an AI Memory System: Mem0, Letta, Zep, Cognee, and Memobase Compared</title>
        <link>https://knightli.com/en/2026/06/11/ai-memory-systems-comparison/</link>
        <pubDate>Thu, 11 Jun 2026 14:30:23 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/06/11/ai-memory-systems-comparison/</guid>
        <description>&lt;p&gt;Once an AI application moves beyond one-off Q&amp;amp;A into long-term use, it runs into the same question: how does it remember people, projects, preferences, history, and changing states?&lt;/p&gt;
&lt;p&gt;Memory solutions have already split into several paths. Some work like an external memory module between your app and database. Some rebuild the Agent itself into a system with memory management. Some care deeply about time and invalidated states. Others focus on user profiles, cross-document reasoning, or coding assistants.&lt;/p&gt;
&lt;p&gt;Looking only at project names quickly gets confusing. A more useful question is: what exactly do you need the AI to remember, and how much architectural complexity are you willing to accept for that memory?&lt;/p&gt;
&lt;h2 id=&#34;start-with-the-conclusion&#34;&gt;Start with the conclusion
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Solution&lt;/th&gt;
          &lt;th&gt;What it resembles&lt;/th&gt;
          &lt;th&gt;Best fit&lt;/th&gt;
          &lt;th&gt;Main cost&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Mem0&lt;/td&gt;
          &lt;td&gt;External memory middleware&lt;/td&gt;
          &lt;td&gt;Adding long-term memory to an existing AI app&lt;/td&gt;
          &lt;td&gt;Cost, storage, and retrieval quality need tuning&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Letta&lt;/td&gt;
          &lt;td&gt;Agent runtime with built-in memory&lt;/td&gt;
          &lt;td&gt;Building an Agent that understands users better over time&lt;/td&gt;
          &lt;td&gt;You need to accept its Agent architecture&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Zep / Graphiti&lt;/td&gt;
          &lt;td&gt;Memory layer with a timeline&lt;/td&gt;
          &lt;td&gt;Customer records, contract states, changing preferences&lt;/td&gt;
          &lt;td&gt;Heavier architecture, often with a graph database&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Cognee&lt;/td&gt;
          &lt;td&gt;Processing layer from documents to knowledge networks&lt;/td&gt;
          &lt;td&gt;Multi-document knowledge bases and cross-document reasoning&lt;/td&gt;
          &lt;td&gt;More complex data processing pipeline&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Memobase&lt;/td&gt;
          &lt;td&gt;User-profile memory&lt;/td&gt;
          &lt;td&gt;AI companions, education, recommendation, consumer products&lt;/td&gt;
          &lt;td&gt;It remembers the person, not a general event stream&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;AgentMemory&lt;/td&gt;
          &lt;td&gt;Cross-session memory for coding assistants&lt;/td&gt;
          &lt;td&gt;AI coding assistants and reusable project context&lt;/td&gt;
          &lt;td&gt;More vertical and narrower in scope&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Text2Mem&lt;/td&gt;
          &lt;td&gt;Memory operation specification&lt;/td&gt;
          &lt;td&gt;Defining verifiable operation protocols for memory systems&lt;/td&gt;
          &lt;td&gt;More of an abstraction layer than a full product replacement&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ReMe&lt;/td&gt;
          &lt;td&gt;Files as memory&lt;/td&gt;
          &lt;td&gt;Letting users directly inspect and edit memory&lt;/td&gt;
          &lt;td&gt;Requires accepting transparent file-based management&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;memU&lt;/td&gt;
          &lt;td&gt;Background active memory Agent&lt;/td&gt;
          &lt;td&gt;Letting the memory system continuously organize context&lt;/td&gt;
          &lt;td&gt;More experimental, with higher engineering uncertainty&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;mem0-the-most-versatile-external-memory-layer&#34;&gt;Mem0: the most versatile external memory layer
&lt;/h2&gt;&lt;p&gt;Mem0 is a good first reference point for understanding AI memory systems. Its goal is not to rewrite your Agent architecture, but to sit between the application, model, and database, extracting conversations, user preferences, project facts, and other content into reusable memory.&lt;/p&gt;
&lt;p&gt;Its strengths are generality, ecosystem breadth, and a relatively low integration threshold. If you already have a chat app, assistant app, or workflow system and want to add “it remembers me,” this kind of middleware is usually the first place to look.&lt;/p&gt;
&lt;p&gt;Another direction from Mem0 is the local version, &lt;code&gt;OpenMemory&lt;/code&gt;. Its appeal is that memory can stay on your own computer and be shared across multiple tools. For users who care about privacy and do not want every tool to rebuild context from scratch, that matters.&lt;/p&gt;
&lt;p&gt;Mem0 is not a magic switch, though. In real use, three issues need attention:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether memory extraction is too aggressive and keeps accumulating irrelevant information.&lt;/li&gt;
&lt;li&gt;Whether retrieved memories reliably match the current task.&lt;/li&gt;
&lt;li&gt;Whether long-term model calls and storage costs remain manageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In short: if you want to add memory to an existing project quickly, start with Mem0. If you want memory to define how the Agent itself runs, it is not the heaviest class of solution.&lt;/p&gt;
&lt;h2 id=&#34;letta-putting-memory-inside-the-agent-itself&#34;&gt;Letta: putting memory inside the Agent itself
&lt;/h2&gt;&lt;p&gt;Letta was formerly MemGPT, and it is not the same kind of thing as Mem0.&lt;/p&gt;
&lt;p&gt;Mem0 is more like an external memory module. Letta is closer to an Agent runtime with memory management built in. It places the large model inside a framework that resembles an operating system, letting the Agent decide what should remain in working context, what should be archived, and what should be retrieved later.&lt;/p&gt;
&lt;p&gt;The advantage of this route is that memory is more deeply tied to Agent behavior. You are not adding a memory layer outside a normal app; you are designing an Agent that manages its own memory from the beginning.&lt;/p&gt;
&lt;p&gt;The cost is also direct: it is heavier. You need to put the project into Letta’s world and accept its runtime model, state management, and development habits.&lt;/p&gt;
&lt;p&gt;Letta fits scenarios where you are building a long-running personal Agent, research assistant, or business assistant from scratch, want it to understand users better over time, and are willing to build around its framework.&lt;/p&gt;
&lt;h2 id=&#34;zep--graphiti-treating-time-as-a-first-class-citizen&#34;&gt;Zep / Graphiti: treating time as a first-class citizen
&lt;/h2&gt;&lt;p&gt;For many memory systems, the problem is not “it cannot remember,” but “it remembers an old answer without knowing it has expired.”&lt;/p&gt;
&lt;p&gt;The key idea in Zep / Graphiti-style systems is time. They do not just store a preference or fact; they also record when it became valid and when it stopped being valid. When a user changes their mind, the old memory does not necessarily get hard-deleted. It becomes a historical state.&lt;/p&gt;
&lt;p&gt;That makes them suitable for changing relationships and facts, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Customer information and follow-up stages.&lt;/li&gt;
&lt;li&gt;Contract clauses and status updates.&lt;/li&gt;
&lt;li&gt;User preferences changing over time.&lt;/li&gt;
&lt;li&gt;Scenarios that need to answer both “what do you like now?” and “what did you like in March?”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This path often leads to graph structures, because state changes, person relationships, event chains, and timelines naturally form networks. The benefit is a clearer evidence chain. The downside is a heavier architecture with higher deployment and maintenance cost.&lt;/p&gt;
&lt;p&gt;If your memory is mostly “current preferences,” you may not need something this heavy. If your memory often needs versions, time, invalidation, and traceability, Zep / Graphiti-style systems become valuable.&lt;/p&gt;
&lt;h2 id=&#34;cognee-turning-documents-into-a-reasoning-knowledge-network&#34;&gt;Cognee: turning documents into a reasoning knowledge network
&lt;/h2&gt;&lt;p&gt;Traditional RAG is more like retrieving passages by similarity. It can find similar text, but it does not necessarily understand relationships between documents.&lt;/p&gt;
&lt;p&gt;Cognee’s direction is to process a body of material into a hybrid memory system combining graphs and vectors. It does not only store passages; it also tries to extract entities, relationships, and structure so the system can reason along the relationship network.&lt;/p&gt;
&lt;p&gt;This fits large-document scenarios, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Internal company knowledge bases.&lt;/li&gt;
&lt;li&gt;Technical documentation and project materials.&lt;/li&gt;
&lt;li&gt;Legal, contract, and product specification materials across files.&lt;/li&gt;
&lt;li&gt;Research tasks that need conclusions assembled from multiple documents.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Its cost is also clear: the data processing chain is longer, there are more system components, and updates, cleaning, deduplication, and relationship extraction all need design. This is not the lightweight route of “add a bit of memory to a chatbot.” It is closer to turning a document repository into a reasoning knowledge network.&lt;/p&gt;
&lt;h2 id=&#34;memobase-remembering-what-kind-of-person-the-user-is&#34;&gt;Memobase: remembering what kind of person the user is
&lt;/h2&gt;&lt;p&gt;Memobase focuses less on remembering every event and more on organizing user profiles.&lt;/p&gt;
&lt;p&gt;While other systems care more about “what happened,” it cares about “what kind of person this user is”: interests, habits, attributes, preferences, and long-term traits. It organizes that information into clearer fields that are easy to read, edit, and productize.&lt;/p&gt;
&lt;p&gt;This is useful for consumer products:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AI companions need to understand personality and relationship boundaries.&lt;/li&gt;
&lt;li&gt;Education products need to remember learning stages, weak points, and goals.&lt;/li&gt;
&lt;li&gt;Recommendation systems need stable, editable preference profiles.&lt;/li&gt;
&lt;li&gt;Health, productivity, and lifestyle assistants need to follow long-term user habits.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Memobase’s boundary is also here. It is not the best fit for general event tracking or complex document reasoning. It is more like a profile-card memory layer: it organizes who the user is, what they like, and what their habits look like.&lt;/p&gt;
&lt;h2 id=&#34;agentmemory-cross-session-memory-for-coding-assistants&#34;&gt;AgentMemory: cross-session memory for coding assistants
&lt;/h2&gt;&lt;p&gt;AgentMemory is more vertical. It mainly solves a common problem for AI coding assistants: every new session requires explaining the project background again.&lt;/p&gt;
&lt;p&gt;What developers really want to preserve is not casual chat memory, but:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The project’s tech stack and directory structure.&lt;/li&gt;
&lt;li&gt;Established coding style.&lt;/li&gt;
&lt;li&gt;Files that should not be touched casually.&lt;/li&gt;
&lt;li&gt;Common commands and test methods.&lt;/li&gt;
&lt;li&gt;Where the previous debugging session stopped.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If these details can be shared across sessions and across multiple coding assistants, they can remove a lot of repeated prompting. AgentMemory fits pure development scenarios, especially when a team or individual maintains the same set of projects over time.&lt;/p&gt;
&lt;p&gt;But it is not a general memory platform. For customer service, companion apps, recommendation, or knowledge bases, the earlier categories are usually more relevant.&lt;/p&gt;
&lt;h2 id=&#34;text2mem-defining-an-operation-instruction-set-for-memory&#34;&gt;Text2Mem: defining an operation instruction set for memory
&lt;/h2&gt;&lt;p&gt;Text2Mem is more like a memory operation protocol. It asks how a memory system should add, update, merge, delete, verify, and output structured results.&lt;/p&gt;
&lt;p&gt;Its idea can be summarized in three points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use a set of atomic operations to describe memory changes instead of letting the model write freely.&lt;/li&gt;
&lt;li&gt;Use a fixed JSON contract to carry memory operations and reduce uncontrolled output.&lt;/li&gt;
&lt;li&gt;Use a validation layer to check results and avoid writing incorrect memory directly into the system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This kind of approach fits the control plane of a memory system. If you already have Mem0, Zep, Graphiti, or a self-built memory layer, Text2Mem’s value may not be replacing them, but constraining memory write operations.&lt;/p&gt;
&lt;h2 id=&#34;reme-files-as-memory-directly-visible-to-users&#34;&gt;ReMe: files as memory, directly visible to users
&lt;/h2&gt;&lt;p&gt;ReMe comes from Alibaba’s AgentScope ecosystem, and its keyword is “files as memory.”&lt;/p&gt;
&lt;p&gt;Many memory systems are black boxes: users do not know what the system remembers and cannot easily edit it. ReMe goes in a more transparent direction by turning memory into files that users can inspect, edit, and manage.&lt;/p&gt;
&lt;p&gt;This matters for trust. In personal assistants, enterprise assistants, and long-running Agents, users may not want memory to be maintained entirely inside a hidden system. Direct editing means users can correct mistakes and actively organize context.&lt;/p&gt;
&lt;p&gt;It fits scenarios that value explainability, control, and portability. The cost is that product design must keep up: file structure, permissions, synchronization, and conflict handling all need serious design.&lt;/p&gt;
&lt;h2 id=&#34;memu-making-memory-itself-a-background-agent&#34;&gt;memU: making memory itself a background Agent
&lt;/h2&gt;&lt;p&gt;memU has a more aggressive paradigm: memory is not just passive storage, but a continuously running background Agent.&lt;/p&gt;
&lt;p&gt;Most memory systems extract, query, and update when conversations happen. memU’s idea is closer to letting the memory layer work 24/7: actively organizing, archiving, compressing, updating, and preparing context.&lt;/p&gt;
&lt;p&gt;This direction is imaginative because a truly long-running Agent should not think about memory only when the user speaks. But it also brings more engineering questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Could background organization accidentally modify important memories?&lt;/li&gt;
&lt;li&gt;How should active update triggers be defined?&lt;/li&gt;
&lt;li&gt;How should cost be controlled?&lt;/li&gt;
&lt;li&gt;How can users audit what it has done?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are building an experimental Agent or a personal long-term assistant, this direction is worth watching. For production systems, controllability and observability still need to be confirmed first.&lt;/p&gt;
&lt;h2 id=&#34;selection-advice&#34;&gt;Selection advice
&lt;/h2&gt;&lt;p&gt;If you only want to add long-term memory to an existing application, start with Mem0. It is general enough, and its integration cost is easier to accept.&lt;/p&gt;
&lt;p&gt;If you are building a long-running Agent from scratch and are willing to restructure the project around an Agent runtime, look at Letta. It is more like an AI body with built-in memory than a normal plugin.&lt;/p&gt;
&lt;p&gt;If your business strongly depends on time, state changes, and historical traceability, look at Zep / Graphiti first. Customers, contracts, preferences, and relationship networks all need to know when something became valid and when it expired.&lt;/p&gt;
&lt;p&gt;If you need to process large amounts of material and perform cross-document reasoning, look at Cognee. It is better suited to turning documents into a knowledge network than merely doing similarity retrieval.&lt;/p&gt;
&lt;p&gt;If your product focuses on understanding the user as a person, look at Memobase. AI companions, education, recommendation, and lifestyle assistants all need a readable and editable user-profile layer.&lt;/p&gt;
&lt;p&gt;If your concern is cross-session memory for AI coding assistants, look at AgentMemory. Its scope is narrow, but the problem is very real.&lt;/p&gt;
&lt;p&gt;If you are building your own memory system, Text2Mem, ReMe, and memU are more like three complementary directions: operation specification, transparent editability, and turning memory into an active background process.&lt;/p&gt;
&lt;h2 id=&#34;a-simple-decision-framework&#34;&gt;A simple decision framework
&lt;/h2&gt;&lt;p&gt;You can filter options with four questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;What is the memory object?&lt;/p&gt;
&lt;p&gt;Is it a user profile, project background, conversation fact, document knowledge, or business state that changes over time?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Does the memory need a timeline?&lt;/p&gt;
&lt;p&gt;If old states still have value, do not only use overwrite-style updates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How much architecture are you willing to change?&lt;/p&gt;
&lt;p&gt;Mem0 is better as an add-on. Letta is better for rebuilding how the Agent runs. Cognee and Zep/Graphiti often bring a heavier data layer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do users need to edit memory directly?&lt;/p&gt;
&lt;p&gt;If transparency and control are required, ReMe and Memobase-style approaches are more useful references.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;There is no single answer for AI memory systems. Use Mem0 for lightweight integration, Letta for Agents with built-in memory, Zep / Graphiti for temporal state, Cognee for cross-document reasoning, Memobase for user profiles, and AgentMemory for coding assistants.&lt;/p&gt;
&lt;p&gt;The more important question is not “which one is strongest,” but “what do I need to remember?” Once the memory object changes, the best technical route changes too.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
