ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

Agent Memory System 之 Recent Advance

Agent Memory System 之 Recent Advance ALA: Cognitive Architectures for Language AgentsCoALA面向语言智能体的认知架构decomposeˌdiːkəmˈpəʊzv. 使腐烂腐败使分解数分解taxonomytækˈsɒnəmin. 分类学分类法practitionerprækˈtɪʃənə(r)n. 医学界或法律界的从业人员执业者正式从事者实践者Sumers et al. [344] propose Cognitive Architectures for Language Agents (CoALA), a unifying framework that organizes the growing zoo of LLM agents using principles from cognitive science and symbolic AI.Sumers 等人提出了 CoALACognitive Architectures for Language Agents一套统一框架。它借鉴认知科学与符号人工智能原理对目前五花八门的大模型智能体方案进行归类梳理。CoALA decomposes a language agent into CoALA 将语言智能体拆解为三大部分• Modular memory: working memory (the context window), episodic memory (past experiences), semantic memory (world knowledge), and procedural memory (action schemas)—mirroring our taxonomy in Section 17.2.模块化记忆工作记忆上下文窗口、情景记忆过往经历、语义记忆世界常识知识、程序记忆行动范式和本书 17.2 小节里的记忆分类完全对应• Structured action space: internal actions (reasoning, retrieval, memory writes) and external actions (tool use, environment interaction).结构化动作空间内部动作推理、记忆检索、写入记忆、外部动作调用工具、和外部环境交互• Decision cycle: a generalized sense–plan–act loop with explicit retrieval and write steps.决策循环通用的「感知‑规划‑执行」闭环并且显式加入记忆检索、记忆写入步骤CoALA’s contribution is less a new system than a design language: it provides a systematic way to analyze existing agents and identify missing capabilities, making it a useful reference architecture for practitioners.CoALA 的核心贡献并不是开发了一套全新智能体系统而是提供了一套设计描述语言is less a new system than a design language。开发者可以用它系统性地剖析现有 Agent找出能力短板非常适合工程人员当作参考架构Mem0: Production‑Scale Memory LayerMem0面向生产环境的记忆中间层supersedeˌsuːpəˈsiːdvt. 替代取代废弃superseded adj. 作废的被取代的salientˈseɪliəntadj. 突出的显著的角凸出的纹章动物后腿站立前爪举起的n. 防御工事的凸出部分compactkəmˈpæktadj. 小型的袖珍的紧凑的紧密的坚实的矮小而健壮的演讲作品简洁的简练的n. 带镜小粉盒合约协定小型汽车袖珍物坯块v. 压紧压实缩短精简订立或签订协定Mem0 [53] addresses the gap between research memory systems and production deployment. Key ideas:Mem0 瞄准学术原型记忆系统和线上落地之间的差距。核心思路如下• Automatic extraction: Rather than relying on the LLM to explicitly issue memory‑write commands, Mem0 automatically extracts salient facts from conversation turns and consolidates them into a persistent store.自动提取记忆不需要大模型显式发送 “写入记忆” 指令Mem0 自动从对话中提取关键事实并整合存入持久化存储。• Graph‑based memory: Beyond flat vector stores, Mem0 maintains a relational graph over extracted entities and facts, enabling multi‑hop memory queries (“What did the user say about topic X in the context of project Y?”).基于图结构的记忆不再是简单扁平向量库flat vector stores它为抽取出来的实体、事实维护一张关系图谱支持多跳记忆检索例如查询在项目 Y 背景下用户关于主题 X 都说过哪些内容• Memory compression: Redundant or superseded facts are automatically merged, keeping the memory store compact and current.记忆压缩自动合并冗余信息、已经过时的事实保证记忆库精简并且存储最新状态current。On the LOCOMO benchmark, Mem0 achieves 26% relative improvement over OpenAI’s baseline memory, with 91% lower p95 latency and 90% token cost reduction compared to full‑context approaches.在 LOCOMO 评测集上Mem0 相比 OpenAI 基线记忆方案相对性能提升 26%p95 延迟降低 91%对比把全部历史塞进上下文的方案Token 开销降低 90% 以上token cost reductionSleep‑Time Compute: Offline Memory Processing 休眠期计算离线记忆加工anticipateænˈtɪsɪpeɪtv. 预期预料预见并做准备期望盼望先于……做早于……行动提前使用artifactsa:rtifæktsn. 史前古器物人工产品amortizedəˈmɔːtaɪzdadj. 分期偿还已摊销的已分期偿还的n. 摊销额vt. 摊销amortize的过去分词分期偿还把…转让Lin et al. [218] introduce sleep‑time compute, a paradigm where agents process and consolidate memory between user interactions rather than only at query time. The analogy is to biological sleep, during which the brain consolidates memories and pre‑computes useful associations.Lin 等人提出休眠期计算Sleep‑Time Compute范式智能体不在用户提问那一刻才处理记忆而是在两次用户交互的空闲间隙完成记忆加工与巩固。灵感来自人脑睡眠过程大脑趁休息巩固记忆预先构建事物之间的关联How it works. During idle periods (“sleep”), the agent:工作流程在空闲休眠时段智能体执行三步Anticipates likely future queries given the current context.根据当前上下文预判用户之后大概率会提出哪些问题Pre‑computes reasoning chains, summaries, and structured representations.预先计算推理链路、内容摘要、结构化记忆表示Stores these pre‑computed artifacts so that test‑time inference can retrieve and reuse them.将预计算结果保存下来等到线上推理test‑time inference时直接检索复用省去重复计算Results. Sleep‑time compute reduces the test‑time compute needed to achieve equivalent accuracy by ∼5× on reasoning benchmarks. When amortized across multiple related queries about the same context, average cost per query drops by 2.5×. The approach is most effective when user queries are predictable—i.e., when the context strongly constrains what questions will be asked.实验结果在推理任务上休眠计算能够把达到同等精度所需的线上算力降低约 5 倍当同一个上下文产生多条相关提问时分摊后单条查询平均成本下降 2.5 倍。该方案最适合用户问题可预测的场景上下文本身就限定了后续提问范围Memory Consolidation as Offline RL 将记忆巩固看作离线强化学习Sleep‑time compute can be viewed as offline policy improvement: during idle time, the agent improves its memory representations (policy) using the data it has already collected (past interactions), without new environment interactions. This connects to offline RL methods (Chapter 8) where the agent learns from a static dataset of trajectories.休眠期计算可以理解成离线策略优化空闲阶段智能体仅利用已经收集好的历史交互数据优化记忆表示记忆策略不需要再和环境产生新交互。这和离线强化学习思路相通智能体从一份固定不变的轨迹数据集当中学习。A‑MEM: Zettelkasten‑Inspired Agentic MemoryA‑MEM受卡片盒笔记法启发的智能体记忆系统A‑MEM [400] introduces a memory system that borrows from the Zettelkasten method—a note‑taking system based on densely interconnected atomic notes—to enable dynamic, self‑organizing memory for LLM agents.A‑MEM 借鉴卡片盒笔记法 (Zettelkasten)设计记忆系统。卡片盒笔记法核心是大量互相链接的原子笔记A‑MEM 以此实现大模型智能体动态、自组织的记忆能力。Key Design Principles.核心设计原则• Structured notes. Each memory entry is not a raw text chunk but a note with multiple structured attributes: a contextual description, keywords, tags, and explicit links to related notes. This metadata enables richer retrieval than embedding similarity alone.结构化笔记每一条记忆不再是原始文本片段而是一条带有丰富属性的笔记上下文描述、关键词、标签、指向其他笔记的显式链接。依托元数据可以实现比单纯向量相似度更精准的检索。• Dynamic linking. When a new memory is added, the system analyzes existing memories to identify semantically meaningful connections and establishes bidirectional links. The result is a knowledge network rather than a flat list.动态建链新增一条记忆时系统扫描已有记忆找出语义关联并创建双向链接最终记忆库形成一张知识网络而不是扁平无关联的列表。• Memory evolution. Critically, adding a new note can trigger updates to existing notes—refining their contextual representations and attributes as the agent’s understanding deepens. This makes memory a living structure that improves over time, not a static archive.记忆演化更新最关键一点新增笔记会触发对旧笔记的修改随着智能体认知加深旧记忆的上下文描述、属性会被优化迭代。记忆不再是一成不变的存档而是可以持续生长进化的活体结构。• Agent‑driven organization. Unlike fixed‑schema memory systems, A‑MEM lets the LLM itself decide how to organize, link, and update memories—making the organizational structure adaptive to the task domain.智能体自主管理不同于固定表结构的记忆系统A‑MEM 交给大模型自己决定如何组织记忆、创建链接、更新旧记忆记忆结构可以适配不同业务任务。Results. Across six foundation models on multi‑session reasoning tasks, A‑MEM consistently outperforms flat vector stores, summarization‑based memory, and graph‑database approaches, demonstrating that how memories are organized matters as much as what is stored实验结论在 6 种不同基座大模型、多会话推理任务上A‑MEM 效果稳定优于扁平向量库、摘要记忆、普通图数据库记忆方案证明记忆的组织方式和记忆存储的内容本身同等重要。总结
返回列表