Cover illustration

Date: 2026-07-02
Suitable for readers: graduate students, scientific readers, AI engineers, AI product/platform architects

Abstract

Agent Memory From "Put chat records into a vector library" to a separate system project: it decides what to remember, how to draw, how to merge conflicts, when to forget, how to be retrieved, how to explain to users, and how to balance privacy, auditing, and delete rights. The new paper from 2025-2026 shows that long-term Memory is no longer just a small plug-in for RAG, but the core resource layer in the Agent infrastructure: Zep/Graphiti toward the timing knowledge graph, Mem0 and Memoria emphasizes the fact that it can be extracted and personalized, A-MEM, AgeMem, EverMemOS try to let the Agent manage the Memory life cycle, MemOS Abstracting Memory into similar operating system resources, LongMemEval-V2, PersonaMem-v2, and MemoryDocDataSet will advance the evaluation from "Can recall a sentence" to environmental experience, implicit preference and cross-source reasoning. At the same time, products and frameworks such as ChatGPT Memory, LangGraph Memory, Letta, Mem0 and other products have brought long-term Memory into real applications. The key question in the next stage is not "whether to remember", but: which Memory has evidence, who has the right to revise, how to avoid Memory poisoning and privacy leakage, and whether the Memory system can be evaluated and governed.

Contents

  • Research background: Why long-term memory suddenly becomes Agent infrastructure
  • Past year roadmap: from vector library to memory operating system
  • Key papers by research question
  • Comparing the methods
  • Technical trends
  • Implications for deployment
  • Limitations and open questions
  • Questions to watch
  • Summary
  • References

Research background: Why long-term memory suddenly becomes Agent infrastructure

The "memory" of LLM has at least three meanings. The first layer is parameter memory, that is, the knowledge solidified in the weight of the model; the second layer is working memory, that is, the current context window. In the past, many applications simplified the third layer to "chat history + embedding + top-k search", but the real agent scene will soon hit the boundary.

Borders come from three aspects. First, personalization is not a simple similarity retrieval. Users may have expressed conflicting preferences at different times, the past may have expired, and implicit preferences should not necessarily be automatically saved by the system. Secondly, the memory of the Agent is not only about users, but also about tasks and environments: the construction pit of a code repository, the operation path of a web page background, and the experimental failure record of a certain scientific research project need to be retained for a long time. Third, memory naturally involves governance. A system that can remember your system across months, across applications, and across devices, may also misinfer your mental state, leak sensitive information, the attacker writes malicious memories, or still passes a summary and derived facts after the user requests deletion.

As a result, the research focus of Agent Memory is shifting from "Improve Recall" to "Life Cycle Management". A mature Memory system includes at least write, extract, merge, version, retrieval, reranking, reference, delete, forget, audit and permission control. It is more like a combination of databases, search engines, log systems and privacy platforms, rather than a common vector library.

Long-term memory system architecture

Past year roadmap: from vector library to memory operating system

The 2023 Generative Agents, MemoryBank and MemGPT have laid three basic routes. Generative Agents combine observation, reflection and planning, so that Agents can form high-level reflections from natural language experience; MemoryBank For long-term companionship and personalization, try to use forgetting curves, user portraits and memory enhancement to simulate human memory; MemGPT clearly draws on the hierarchical storage of the operating system, and regards the limited context window as "virtual context management" problem.

Beginning in 2025, the route has been significantly differentiated. Zep proposes a sequential knowledge graph architecture for enterprise Agent memory, emphasizing dynamic integration of dialogue and business data; A-MEM draws from Zettelkasten, using agent Write, link and update the organization memory network; Mem0 makes long-term session memory in the production environment into a evaluable framework and adds graph memory; MemOS and MemoryOS The memory is upgraded to an operating system-style resource, and the representation, scheduling, migration, fusion and governance are discussed. By the end of 2025, MIRIX, Memoria, PersonaMem-v2 and other work will further cover multimodal, knowledge graph user portraits and implicit personalization.

In 2026, evaluation and governance began to catch up. LongMemEval-V2 tests whether a web agent remembers environment states, workflows, changes, and lessons from earlier mistakes, beyond recalling what a user said. MemoryDocDataSet combines memory across sessions with reasoning over long documents, exposing gaps between conversation retrieval and document retrieval. Algorithmic Self-Portrait audits real ChatGPT memory entries and raises questions about user agency and the sensitive inferences a system can make when it creates memories automatically. MemX, SuperLocalMemory, and MemPrivacy explore local-first approaches, defenses against memory poisoning, and privacy across devices and the cloud.

Key papers by research question

1. Classic Fundamentals: From Reflection Memory to Virtual Context

The core of Generative Agents is not "role-playing", but split the agent behavior into Observation, Memory Stream, Retrieval, Reflection, Planning. It shows that long-term behavioral consistency requires empirical records and high-level reflections to work together. This is still an important inspiration for today's Agent platform: the original event log is not equal to available memory, and the system needs to compress low-level events into reusable experience.

MemoryBank regards long-term companionship as an application scenario, emphasizing user portraits, emotional interaction and selective forgetting. Although its experimental environment is still far from the production system today, its proposed "memory will strengthen or decay over time" is very realistic. Not all conversations should be permanently preserved; memory value should vary with new evidence, task frequency and user feedback.

The influence of MemGPT is more biased to the system structure. It regards the context window as a limited fast storage, treats external storage as a slow long-term layer, and extends the effective context through the model actively manages internal and external storage exchange. This analogy continues to be amplified by MemOS, MemoryOS, EverMemOS, etc. from 2025 to 2026: the memory is no longer a Prompt attachment, but a resource that is scheduled, compressed, migrated and audited.

2. Production memory layer: fact extraction, graph structure and enterprise context

The focus of Zep is Temporal Knowledge Graph. It notes that enterprise Agents face not just static documents, but constantly changing conversations, customers, projects, and business entities. Graphit times try to save "when the relationship holds, when it changes, and where it comes from". The paper reports that it is superior to several baselines in DMR and LongMemEval related evaluations, but these numbers should still be understood in terms of preprints and specific implementation conditions, and they need to be re-tested on their own data before landing.

Mem0 is more like an engineering route: the key information in the session is extracted to retrieve the facts, and only the most relevant memory is returned when retrieved. The paper reports that Mem0 on LOCOMO has improved the LLM-as-a-judge metric, and significantly reduces the P95 delay and token cost. The key inspiration here is not a percentage, but the benefits of long-term memory must look at both Accuracy, Delay, Token cost and maintainability. The full context may be simple, but it is usually not sustainable in multi-session, multi-user, multi-agent scenarios.

The documentation of Letta and LangGraph reflects the framework layer consensus. LangGraph defines short-term memory as thread-scoped state, puts long-term memory into cross-thread namespace/store, and distinguishes semantic, episodic, procedure Memory; Letta emphasizes the Stateful Agents, using Memory blocks, messages, tools, and persistent databases to manage the state of the agent. These product-based interfaces indicate that long-term memory is becoming a first-class citizen of the development framework.

3. Agentic Memory: Engage Agents in Writing, Linking, and Forgotten

The idea of A-MEM is to hand the memory organization to the Agent, not a fixed pipeline. When the new memory is added, the system generates Notes with attributes such as context, keywords, tags, etc., and lets the agent analyze historical memory, establish a connection, and update the old memory representation. It draws on the core idea of Zettelkasten: knowledge is not an isolated card, but a network that constantly links and evolves.

In 2026, AgemM further proposed to use long and short-term memory management as part of the agent policy: storage, retrieval, update, summarization, and discarding can all be used as tool actions, and use step-by-step reinforcement learning to train when to perform these actions. This direction is important because the memory decision of the real agent is highly dependent on the task stage. Customer service agents, code agents, scientific research agents, and personal assistants have completely different judgments on "worth remembering", and it is difficult to take all the fixed rules.

EverMemOS emphasizes the self-organizing life cycle: from Episodic Trace to form MemCells, to semantic consolidation to form MemScenes, and then through reconstructive recollection Combines the context required for downstream reasoning. Its conceptual value is to change the memory from "write once, retrieve multiple times" to "continuously consolidate, correct, and reconstruct". However, this kind of agent memory also brings new risks: when the system automatically rewrites old memories, the original evidence, version and rollback capability must be retained, otherwise it is difficult to audit when the error was introduced.

4. Personalization and implicit preferences: remember users, or over-inference users?

Personnamem-v2 pushes personalized reviews to implicit preferences. In reality, users rarely say "please remember that I prefer X", and are more indirectly exposed to targets, constraints, styles and taboos in long-term conversations. This dataset uses a large number of simulated user interactions and preferences to evaluate whether the model can understand implicit Persona and report that Frontier LLM is still difficult in implicit personalization. The engineering inspiration here is: personalized memory can not only rely on explicit facts, but also processing preference inference; but the stronger the inference, the higher the governance requirements.

Algorithmic Self-Portrait directly audits real ChatGPT memory entries. The paper analyzes 2,050 memories of 80 users, and most of the reports are unilaterally generated by the system and contain personal data and psychological inference. This result is a warning for all long-term memory products: users may not know which sentences the system has converted into long-term portraits. The memory interface should not only provide "delete all memories", but also provide sources, confidence, sensitive types, recent usage records, and editable explanations.

MemPrivacy starts from the side cloud architecture, tries to identify the privacy-sensitive SPAN on the end side, participates in the cloud-side memory processing with the typed placeholder, and then restores the original value locally. This direction is suitable for scenarios such as mobile terminals, enterprise desktop Agents, and medical/legal/finance: the semantic structure of memory can participate in the retrieval, but the original sensitive value does not have to be exposed to the cloud. The relevant experimental figures still need to be manually verified and reproduced, but the definition of the problem itself is already very clear.

5. Evaluation: From chat recall to environmental experience and cross-origin reasoning

LongMemEval is an important benchmark for long-term chat memory evaluation, covering the capabilities of information extraction, multi-session reasoning, time reasoning, knowledge update and Abstentation. It reminds us that long-term memory is not a single retrieval task. A system needs to find the old facts, know whether the facts are expired, and also reject Hubian when there is no relevant memory.

LongMemEval-V2 replaces the object with specialized web environments. It evaluates whether the Agent can extract static state, dynamic state, workflow, environmental pit and premise Awareness from up to 500 trajectories, hundreds of millions of token history. The paper report is based on the Coding Agent's AgentRunbook-C, but the delay cost is high. This shows that the next-generation memory system may not be just a vector retrieval, but a hybrid architecture of "documented experience library + executable evidence collection agent + retrieval summary".

MemoryDocDataSet further pointed out that real tasks often require finding relevant documents from the conversation memory first, and then intensive reading in long documents. Individual optimization of Conversation Memory or Document RAG is not enough, and the system needs joint retrieval and cross-origin evidence chain. For scientific research, legal, customer service and enterprise knowledge base, this may be a very common failure model.

Comparing the methods

Route Representative work/system memory pattern When to use it Main risk
full history context Long context model, simple chat archive Original Message Sequence Small-scale, low-frequency sessions, audit playback High cost, strong interference, and large privacy exposure
vector library/RAG Traditional Memory RAG, partial LangGraph Store implementation chunk, fact, abstract Low-cost recall, document or session retrieval Weak time relationship, weak conflict handling, mistakes recall
structured portrait MemoryBank、Memoria、PersonaMem-v2 User profile, preferences, attributes Personalized Assistant, CRM, Education Companion Excessive inference, outdated portraits, insufficient user agency
Timing/Graphic Memory Zep/Graphiti、Mem0 graph、MemoTime Entity, Relationship, Timestamp, Evidence Enterprise context, multi-substantive multi-hop reasoning Graph building errors will spread for a long time
Agentic memory A-MEM、AgeMem、EverMemOS Agent write, link, update, forget Long cycle tasks, research/code/web agent Automatic rewriting of difficult audits, complex training and evaluation
memory operating system MemGPT、MemOS、MemoryOS Hierarchical storage, MemCube, resource scheduling Platform-level Agent Runtime Abstract mega, standard and interoperation is still not stable
Local/Privacy Priority MemX、SuperLocalMemory、MemPrivacy Local database, FTS, privacy placeholder Desktop Agent, Enterprise Intranet, Sensitive Industry Limited multi-terminal synchronization, availability and model capabilities

Technical trends

First, memory writes are moving from synchronous tool calls into asynchronous background services. The LangGraph documentation distinguishes hot-path and background writes. A hot-path write makes new information available immediately but adds latency. Background writes are easier to batch and deduplicate, but other threads may briefly lack access to a new memory. Production systems typically need both. Explicit user instructions, preference changes, and safety-related memories take the hot path, while routine conversation summaries, deduplication, and consolidation run in the background.

Second, the memory granularity is moving from Chunk to Evidence-Backed Fact. It is easy to recall the chunk directly in the long session. A more secure design is to save the original Episode, extract facts, source SPAN, timestamp, Confidence and update history at the same time. The answer is a compact fact, but the original text can be played back during the audit.

Third, graph and time become the core structure of long-term memory. The hardest part of personalization is often not "users like coffee", but "users used to like coffee, but recently they changed tea because of sleep problems", "this preference is only applicable to working days", "this conclusion comes from a joke or a clear order". Without time, entities and relationships, many memories can be misled in cross-month interactions.

Fourth, memory evaluation is multidimensional. Just look at QA Accuracy is not enough, but also look at abstention, expired fact updates, conflict resolution, sensitive information processing, post-deletion residual, delay, token cost, write noise, error recall and user controllability. The memory system will have its own Eval Harness, not attached to the general purpose LLM Benchmark.

Fifth, the governance layer will become the ability to differentiate. The memory switch of the product layer is only the first step. The truly usable long-term memory requires Memory diff, Memory Provenance, user confirmation policies, sensitive type policies, tenant isolation, audit logs, TTL, delete propagation, export formats, and data retention policies.

Implications for deployment

If you want to add long-term memory to Agent products today, it is not recommended to start with "Buy a Vector Library", but define the memory contract first.

First, define Memory Schema. At least distinguish facts, preferences, task status, environmental experience, procedural rules and original events; each memory must have Subject, Source, Timestamp, Confidence, Scope, TTL, Sensitivity, last_used_at, superseded_by and other fields. Natural language memory without Schema will soon get out of control.

Second, design permissions before writing. What content must user explicitly agree? What content can be saved automatically but must be visible? What content can only be saved locally? What contents are not saved by default, such as health, finance, minors, identity authentication, intimate relationships and psychological states? These policies should be implemented at the system layer, rather than relying on Prompt to remind the model "Please be cautious".

Third, the search must have abstention. One of the most dangerous failures of long-term memory is to bring wrong memories into the answer. MemX, LongMemEval and other work remind us that low confidence rejection is as important as "no relevant memory found". Projects can use mixed retrieval, RRF, time filtering, entity filtering, reranking and evidence thresholds, but you must record why a memory was recalled.

Fourth, give the user a Memory Inbox. All newly written or highly sensitive inferences go to the reviewable list, and users can confirm, edit, downgrade to short-term, set expired or deleted. For corporate scenarios, it is also necessary to support administrator policy and tenant-level auditing, but do not allow administrators to view personal sensitive memories at will.

Fifth, treat deletion as a system function, not a UI function. After deleting a memory, the derived summary, edge, cache, prompt profile, offline training samples, and cross-device copies are all processed. Otherwise, "delete" is just hidden in the front end.

Sixth, the evaluation should use your own long-period trajectory. An open benchmark can provide directions, but each product has a different memory semantics. The customer service needs to measure the Ticket Continuity, the code agent needs to measure the repository experience and build pits, the scientific research agent needs to test the evolution of experimental parameters, and the personal assistant needs to test the preferences and privacy control.

Limitations and open questions

First, many 2025-2026 memory papers are still arXiv preprints, and the evaluation data, implementation details and control conditions require manual review. In particular, statements with "SOTA" and "significant reductions in costs" should be retested under the same model, the same data, and the same delayed budget.

Second, long-term memory and long-context model are not substitutes. The long context is suitable for reading large materials at one time, and long-term memory is suitable for cross-session, cross-task, and cross-time state maintenance. In the future, the system will use both at the same time: long context to deep reading, long-term memory for continuous state.

Third, the boundary between personalization and manipulation is blurred. When the model remembers user goals, weaknesses, styles, and emotional responses for a long time, recommendations, persuasions, and dependencies are stronger. The security assessment of the memory system should not only look at the leakage of privacy, but also on the impact of behavior.

Fourth, automatic memory will change the human-machine relationship. If an assistant actively remembers the content that the user does not explicitly require to save, it will be more considerate in the short term, and may make the user lose control in the long run. The results of Algorithmic Self-Portrait state that memory transparency itself is part of the product experience.

Questions to watch

  1. Is there a generic Memory Schema or Memory Interchange format, allowing users to migrate memory between different Agent products?
  2. Will memory writes go from the Prompt rule to the trained policy, such as the RL routes like AgeMem?
  3. How to combine graph memory and vector memory to support both fact recall, relational reasoning, time reasoning and low latency?
  4. Will memory poisoning, cross-session Prompt Injection and malicious preference writes become the new main battlefield for Agent security?
  5. How can the right to delete, interpret and portable be implemented in the long-term memory system, not just the commitment in the compliance document?
  6. Can Local Priority Memory form a mainstream architecture on the mobile and desktop ends, especially in the personal assistant and enterprise Agent scenarios?

Summary

The next phase of the Agent Memory will not just be "larger context" or "better vector retrieval". A truly valuable long-term Memory system must solve four things at the same time: remember correctly, use it correctly, change it, and delete it cleanly. The 2025-2026 research has moved the problem from algorithm skills to system architecture: Memory has types, life cycle, evidence, authority, evaluation, and risk. For the engineering team, the most pragmatic route is to first use Memory as a governed data asset, not an appendage of Prompt. Only then can personalized agents move from short-term demonstrations to long-term trusted collaboration.

References

Search date: 2026-07-02. The following priority is given to listing arXiv, official documents and project documents; the experimental conclusions of the preprint 2025-2026 are all recommended to be manually verified before citation.

  1. Joon Sung Park et al., Generative Agents: Interactive Simulacra of Human Behavior, arXiv, 2023. https://arxiv.org/abs/2304.03442
  2. Wanjun Zhong et al., MemoryBank: Enhancing Large Language Models with Long-Term Memory, arXiv, 2023. https://arxiv.org/abs/2305.10250
  3. Charles Packer et al., MemGPT: Towards LLMs as Operating Systems, arXiv, 2023. https://arxiv.org/abs/2310.08560
  4. Di Wu et al., LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory, arXiv, 2024. https://arxiv.org/abs/2410.10813
  5. Preston Rasmussen et al., Zep: A Temporal Knowledge Graph Architecture for Agent Memory, arXiv, 2025. https://arxiv.org/abs/2501.13956
  6. Wujiang Xu et al., A-MEM: Agentic Memory for LLM Agents, arXiv, 2025. https://arxiv.org/abs/2502.12110
  7. Prateek Chhikara et al., Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory, arXiv, 2025. https://arxiv.org/abs/2504.19413
  8. Zhiyu Li et al., MemOS: An Operating System for Memory-Augmented Generation in Large Language Models, arXiv, 2025. https://arxiv.org/abs/2505.22101
  9. Yu Wang and Xi Chen, MIRIX: Multi-Agent Memory System for LLM-Based Agents, arXiv, 2025. https://arxiv.org/abs/2507.07957
  10. Bowen Jiang et al., PersonaMem-v2: Towards Personalized Intelligence via Learning Implicit User Personas and Agentic Memory, arXiv, 2025. https://arxiv.org/abs/2512.06688
  11. Yi Yu et al., Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model Agents, arXiv, 2026. https://arxiv.org/abs/2601.01885
  12. Chuanrui Hu et al., EverMemOS: A Self-Organizing Memory Operating System for Structured Long-Horizon Reasoning, arXiv, 2026. https://arxiv.org/abs/2601.02163
  13. Abhisek Dash et al., The Algorithmic Self-Portrait: Deconstructing Memory in ChatGPT, arXiv, 2026. https://arxiv.org/abs/2602.01450
  14. Lizheng Sun, MemX: A Local-First Long-Term Memory System for AI Assistants, arXiv, 2026. https://arxiv.org/abs/2603.16171
  15. Di Wu et al., LongMemEval-V2: Evaluating Long-Term Agent Memory Toward Experienced Colleagues, arXiv, 2026. https://arxiv.org/abs/2605.12493
  16. Qiyang Xie et al., MemoryDocDataSet: A Benchmark for Joint Conversational Memory and Long Document Reasoning, arXiv, 2026. https://arxiv.org/abs/2606.04442
  17. LangChain Docs, Memory overview, accessed 2026-07-02. https://docs.langchain.com/oss/python/concepts/memory
  18. Letta Docs, Introduction to Stateful Agents, accessed 2026-07-02. https://docs.letta.com/guides/core-concepts/stateful-agents
  19. Mem0 Docs, Overview, accessed 2026-07-02. https://docs.mem0.ai/platform/overview
  20. OpenAI Help Center, Memory FAQ, accessed 2026-07-02. https://help.openai.com/en/articles/8590148-memory-faq