Lifelong interactive agents are expected to assist users over months or years, which requires continually writing long term memories while retrieving the right evidence for each new query under fixed context and latency budgets. Existing memory systems often degrade as histories grow, yielding redundant, outdated, or noisy retrieved contexts. We present \textbf{All-Mem}, an online/offline lifelong memory framework that maintains a topology structured memory bank via explicit, non destructive consolidation, avoiding the irreversible information loss typical of summarization based compression. In online operation, it anchors retrieval on a bounded visible surface to keep coarse search cost bounded. Periodically offline, an LLM diagnoser proposes confidence scored topology edits executed with gating using three operators: Split, Merge, and Update, while preserving immutable evidence for traceability. At query time, typed links enable hop bounded, budgeted expansion from active anchors to archived evidence when needed. Experiments on \textbf{LoCoMo} and \textbf{LongMemEval-s} show improved retrieval and QA over representative baselines. The code is available at https://github.com/LvCan926/All-Mem.
翻译:终身交互智能体预期在数月乃至数年间持续协助用户,这要求在固定上下文长度和延迟预算下,持续写入长期记忆的同时为每个新查询检索正确证据。现有记忆系统常因历史信息增长而性能退化,导致检索到的上下文冗余、过时或包含噪声。我们提出\textbf{All-Mem}——一种在线/离线终身记忆框架,通过显式、非破坏性整合维持拓扑结构化的记忆库,避免了基于摘要压缩的典型不可逆信息丢失。在线运行时,它将检索锚定在有限的可视表面上以保持粗略搜索成本可控。在周期性的离线阶段,LLM诊断器会提出基于置信度分数的拓扑编辑方案,通过分拆(Split)、合并(Merge)和更新(Update)三种算子配合门控机制执行编辑,同时保留不可变证据以实现可追溯性。查询时,类型化链接使得从活跃锚点向存档证据的跳数受限的预算式扩展成为可能。在\textbf{LoCoMo}和\textbf{LongMemEval-s}上的实验表明,本方法在检索和问答任务上均优于代表性基线。代码开源于https://github.com/LvCan926/All-Mem。