Agent Memory
Search documents
最火、最全的Agent记忆综述,NUS、人大、复旦、北大等联合出品
机器之心· 2025-12-22 09:55
Core Insights - The article discusses the evolution of memory systems in AI agents, emphasizing the transition from optional modules to essential infrastructure for various applications such as conversational assistants and code engineering [2] - A comprehensive survey titled "Memory in the Age of AI Agents: A Survey" has been published by leading academic institutions to provide a unified perspective on the rapidly expanding yet fragmented concept of "Agent Memory" [2] Forms of Memory - The survey categorizes agent memory into three main forms: token-level, parametric, and latent memory, focusing on how information is represented, stored, and accessed [16][24] - Token-level memory is defined as persistent, discrete units that are externally accessible and modifiable, making it the most explicit form of memory [18] - Parametric memory involves storing information within model parameters, which can lead to challenges in retrieval and updating due to its flat structure [22] - Latent memory exists in the model's internal states and can be continuously updated during inference, providing a compact representation of memory [24][26] Functions of Memory - The article identifies three core functions of agent memory: factual memory, experiential memory, and working memory [29] - Factual memory aims to provide a stable reference for knowledge acquired from user interactions and environmental facts, ensuring consistency across sessions [31] - Experiential memory focuses on accumulating knowledge from past interactions to enhance problem-solving capabilities, allowing agents to learn from experiences [32] - Working memory manages information within single task instances, addressing the challenge of processing large and complex inputs [35] Dynamics of Memory - The dynamics of memory encompass three stages: formation, evolution, and retrieval, which form a feedback loop [38] - The formation stage encodes raw context into more compact knowledge representations, addressing computational and memory constraints [40] - The evolution stage integrates new memories with existing ones, ensuring coherence and efficiency through mechanisms like pruning and conflict resolution [43] - The retrieval stage determines how memory can assist in decision-making, emphasizing the importance of effective querying strategies [41] Future Directions - The article suggests that future memory systems should be viewed as a core capability of agents rather than mere retrieval plugins, integrating memory management into decision-making processes [49][56] - There is a growing emphasis on automating memory management, allowing agents to self-manage their memory operations, which could lead to more robust and adaptable systems [54][62] - The integration of reinforcement learning into memory control is highlighted as a potential pathway for developing more sophisticated memory systems that can learn and optimize over time [58][60]
Approaches for Managing Agent Memory
LangChain· 2025-12-18 17:53
Memory Updating Mechanisms for Agents - Explicit memory updating involves directly instructing the agent to remember specific information, similar to how cloud code functions [2][5][6][29] - Implicit memory updating occurs through the agent learning from natural interactions with users, revealing preferences without explicit instructions [7][19][29] Deep Agent CLI and Memory Management - Deep agents have a configuration home directory with an `agent MD` file that stores global memory, similar to Claude's `cloud MD` [3][4][6] - The `agent MD` files are automatically loaded into the system prompt of deep agents, ensuring consistent memory access [6] - Deep agent CLI allows adding information to global memory using natural language commands, updating the `agent MD` file [5] Implicit Memory Updating and Reflection - Agents can reflect on past interactions (sessions or trajectories) to generate higher-level insights and update their memory [8][9][10][28] - Reflection involves summarizing session logs (diaries) and using these summaries to refine and update the agent's memory [11][12] - Accessing session logs is crucial for implicit memory updating; Langsmith can be used to store and manage deep agent traces [13][14][15] Practical Implementation and Workflow - A utility can be used to programmatically access threads and traces from Langsmith projects [21] - The deep agent can be instructed to read interaction threads, identify user preferences, and update global memory accordingly [24][25] - Reflecting on historical threads allows the agent to distill implicit preferences and add them to its global memory, improving future interactions [26][27][28]