Skip to content

MemOS: A Memory OS for AI System

MemoryAgent10200+80+MemTensor上海算法创新研究院中国电信同济大学浙江大学中国科学技术大学北京大学中国人民大学北京航空航天大学上海交通大学

Li Z, Song S, Xi C, et al. MemOS: A Memory OS for AI System[J]. arXiv preprint arXiv:2507.03724v4, 2025.

https://memos.openmem.net/

https://github.com/MemTensor/MemOS


MemOS:AI 系统的记忆操作系统

Abstract

Large Language Models (LLMs) have become an essential infrastructure for Artificial General Intelligence (AGI), yet their lack of well-defined memory management systems hinders the development of long-context reasoning, continual personalization, and knowledge consistency. Existing models mainly rely on static parameters and short-lived contextual states, limiting their ability to track user preferences or update knowledge over extended periods. While Retrieval-Augmented Generation (RAG) introduces external knowledge in plain text, it remains a stateless workaround without lifecycle control or integration with persistent representations. Recent work has modeled the training and inference cost of LLMs from a memory hierarchy perspective, showing that introducing an explicit memory layer between parameter memory and external retrieval can substantially reduce these costs by externalizing specific knowledge. Beyond computational efficiency, LLMs face broader challenges arising from how information is distributed over time and context, requiring systems capable of managing heterogeneous knowledge spanning different temporal scales and sources. To address this challenge, we propose MemOS, a memory operating system that treats memory as a manageable system resource. It unifies the representation, scheduling, and evolution of plaintext, activation-based, and parameter-level memories, enabling cost-efficient storage and retrieval. As the basic unit, a MemCube encapsulates both memory content and metadata such as provenance and versioning. MemCubes can be composed, migrated, and fused over time, enabling flexible transitions between memory types and bridging retrieval with parameter-based learning. MemOS establishes a memory-centric system framework that brings controllability, plasticity, and evolvability to LLMs, laying the foundation for continual learning and personalized modeling.

大语言模型(LLM)已成为通用人工智能(AGI)的关键基础设施,但其缺乏定义明确的记忆管理系统,阻碍了长上下文推理、持续个性化和知识一致性的发展。 现有模型主要依赖静态参数和短暂的上下文状态,这限制了它们长期追踪用户偏好或更新知识的能力。 尽管检索增强生成(RAG)以纯文本形式引入外部知识,但它仍然是一种无状态的权宜方案,既没有生命周期控制,也未与持久化表示集成。 近期工作从记忆层次结构的角度对 LLM 的训练与推理成本进行了建模,并表明在参数记忆和外部检索之间引入显式记忆层,可以通过外部化特定知识显著降低这些成本。 除计算效率之外,LLM 还面临信息在时间和上下文中分布所带来的更广泛挑战,因此需要能够管理跨越不同时间尺度和来源的异构知识的系统。 为应对这一挑战,我们提出 MemOS,一种将记忆视为可管理系统资源的记忆操作系统。 它统一了纯文本记忆、激活记忆和参数记忆的表示、调度与演化,从而实现成本高效的存储和检索。 作为基本单元,MemCube 同时封装记忆内容以及来源、版本等元数据。 MemCube 可以随时间进行组合、迁移和融合,从而支持不同记忆类型之间的灵活转换,并连接检索与基于参数的学习。 MemOS 建立了以记忆为中心的系统框架,为 LLM 带来可控性、可塑性和可演化性,并为持续学习和个性化建模奠定基础。

1. Introduction

MemOS benchmark summary

图1:MemOS 在所有基准上均取得最先进性能。该图全面汇总评测结果,展示 PreFEval(0 轮和 10 轮)的个性化响应率、PersonaMem 的精确率、LongMemEval 的总体平均分,以及 LoCoMo 基准的总体平均 LLM 裁判分数。MemOS(MemOS-1031)在所有类别中始终排名第一,显著超过 MIRIX、Mem0、Zep、Memobase、MemU 和 Supermemory 等强基线。完整指标分别见表 3、表 5、表 4 和表 6。

With the advent of the Transformer architecture and the maturation of self-supervised pretraining, Large Language Models (LLMs) have become the cornerstone of modern NLP. Trained on large-scale corpora, LLMs exhibit near-human performance in open-domain QA, text generation, and summarization tasks. With increasing model size and compute, their capabilities have expanded to structured code generation, cross-modal reasoning, multi-turn dialogue, and complex planning—positioning LLMs as a leading paradigm toward Artificial General Intelligence (AGI).

随着 Transformer 架构的出现和自监督预训练的成熟,大语言模型(LLM)已经成为现代自然语言处理的基石。 在大规模语料上训练后,LLM 在开放域问答、文本生成和摘要任务中表现出接近人类的性能。 随着模型规模和计算量增加,它们的能力已扩展到结构化代码生成、跨模态推理、多轮对话和复杂规划,使 LLM 成为迈向通用人工智能(AGI)的主导范式。

Looking ahead, the presence of LLMs, or more generally, AGI systems, will expand vastly in both time and space. Temporally, models will shift from stateless, session-based tools to persistent agents embedded in long-running workflows. Much like humans, they will need to accumulate interaction histories, adapt internal states, and reason over extended contexts. Spatially, LLMs are evolving into foundational intelligence layers across users, platforms, and ecosystems. Whether deployed in cloud services or embedded in enterprise systems, they must support consistency, adaptability, and personalization across users, roles, and tasks. As such omnipresence becomes the norm, a critical challenge emerges: how should knowledge be organized, stored, and retrieved?

展望未来,LLM,或者更广义的 AGI 系统,将在时间和空间两个维度上大幅扩展其存在范围。 在时间上,模型将从无状态的会话式工具转变为嵌入长期运行工作流的持久智能体。 与人类相似,它们需要积累交互历史、调整内部状态,并在延展的上下文中进行推理。 在空间上,LLM 正在演变为跨用户、平台和生态系统的基础智能层。 无论部署在云服务中还是嵌入企业系统,它们都必须在不同用户、角色和任务之间支持一致性、适应性与个性化。 当这种无处不在成为常态时,一个关键挑战随之出现:应当如何组织、存储和检索知识?

With expanding interaction histories, models face a potentially unbounded context space. We anticipate that future LLMs will seek to leverage as much of their accessible temporal and spatial context as possible, to support deeper reasoning, decision-making, and adaptation. No longer reprocessing all past information per inference, they will decide what to retain, compress, discard, or prioritize. In this always-on paradigm, memory becomes a necessity, not an add-on, for maintaining coherent behavior and identity over time. This requires efficient management of large-scale, multi-source information and dynamic scheduling of memory conditioned on context. This motivates a layered memory hierarchy, similar to how OSs manage memory, consisting of working memory, long-term storage, and cold archives, governed by recency, access frequency, and importance. Sharing memory across users and agents requires scoping, permission control, and migratable, reusable representations. These capabilities are vital not only for system efficiency, but for the long-term sustainability of model-based knowledge evolution.

随着交互历史不断扩展,模型面对的是一个可能无界的上下文空间。 我们预计,未来的 LLM 将尽可能利用其可访问的时间与空间上下文,以支持更深入的推理、决策和适应。 它们不会在每次推理时重新处理全部历史信息,而会决定保留、压缩、丢弃或优先处理哪些内容。 在这种持续在线的范式中,为了长期维持连贯的行为与身份,记忆将成为必需品,而非附加组件。 这要求高效管理大规模、多来源信息,并根据上下文动态调度记忆。 由此需要一种类似操作系统管理内存的分层记忆体系,由工作记忆、长期存储和冷归档组成,并根据新近性、访问频率和重要性进行管理。 在用户和智能体之间共享记忆需要作用域控制、权限管理,以及可迁移、可复用的表示。 这些能力不仅对系统效率至关重要,也关系到基于模型的知识长期演化能否持续。

The management of memory will become model-defined instead of human-defined. Just as deep learning replaced feature engineering, the transition of memory management from hard-coded pipelines (e.g., RAG) to learnable strategies is natural and necessary. Future agents will autonomously decide whether to retrieve memory, summarize interaction into reusable rules, abstract preferences, or transfer knowledge across contexts. In essence, models must take on the responsibility of shaping their own memory architectures and strategies. Yet, existing infrastructures fall short of enabling this shift.

记忆管理将由模型定义,而非由人定义。 正如深度学习取代了特征工程,记忆管理从硬编码流水线(例如 RAG)转向可学习策略,是自然而必要的演进。 未来的智能体将自主决定是否检索记忆、把交互总结为可复用规则、抽象偏好,或在不同上下文之间迁移知识。 从本质上说,模型必须承担塑造自身记忆架构和策略的责任。 然而,现有基础设施尚不足以支持这一转变。

Mainstream LLMs rely on implicit parameter memory, encoding knowledge in billions or trillions of model weights. While this approach affords generalization, it suffers from high update cost, poor interpretability, and limited flexibility. Retraining or fine-tuning requires significant computational resources and risks issues such as catastrophic forgetting.

主流 LLM 依赖隐式的参数记忆,将知识编码在数十亿或数万亿模型权重中。 尽管这种方法具备泛化能力,但它面临更新成本高、可解释性差和灵活性有限等问题。 重新训练或微调需要大量计算资源,还可能引发灾难性遗忘等风险。

To address this bottleneck, Retrieval-Augmented Generation (RAG) has emerged as a popular augmentation strategy. By incorporating external retrieval modules, RAG allows models to dynamically access fresh information at inference time, enabling augmentation without parameter updates. It is now widely deployed in systems such as Copilots and enterprise search. Nonetheless, RAG remains fundamentally an “on-the-fly retrieval and transient composition” pipeline, rather than an integrated memory management system. It lacks core memory manageability features such as lifecycle tracking, versioning, and permission-aware scheduling, limiting its ability to support long-term, adaptive knowledge systems. As a result, models continue to exhibit short-memory behavior in multi-turn dialogue, planning, and personalization tasks, struggling to maintain behavioral consistency or long-horizon adaptation.

为解决这一瓶颈,检索增强生成(RAG)已成为一种流行的增强策略。 通过引入外部检索模块,RAG 允许模型在推理时动态访问新信息,从而无需更新参数即可完成增强。 它如今已广泛部署于 Copilot 和企业搜索等系统中。 然而,RAG 从根本上仍是一条“即时检索与临时组合”的流水线,而非集成式记忆管理系统。 它缺乏生命周期追踪、版本控制和权限感知调度等核心记忆可管理能力,因而难以支持长期、自适应的知识系统。 因此,模型在多轮对话、规划和个性化任务中仍表现出短期记忆行为,难以维持行为一致性或实现长程适应。

LLM knowledge and memory taxonomy

图2:LLM 知识分类,包括记忆层次结构。从模型激活中提取的显式记忆位于原始数据与模型参数之间,因此使用虚线表示它们可能被视为参数,也可能不被视为参数。

Recent work has shown that the limitations of current memory mechanisms are not incidental, but stem from the architectural absence of explicit and hierarchical memory representations within LLMs. For example, prior work argues that without an intermediate explicit memory layer bridging external retrieval and parametric storage, models become suboptimal in terms of read-write cost, and cannot balance storage cost against retrieval efficiency. This distinction is illustrated in Figure 2, which categorizes knowledge and memory formats and highlights the intermediate role of explicit memory.

近期工作表明,当前记忆机制的局限并非偶然,而是源于 LLM 架构内部缺少显式、分层的记忆表示。 例如,已有工作指出,如果缺少连接外部检索与参数存储的中间显式记忆层,模型在读写成本上将处于次优状态,也无法在存储成本与检索效率之间取得平衡。 图2展示了这种区别:它对知识与记忆格式进行分类,并突出显式记忆的中间作用。

From a systems perspective, neither parametric memory nor RAG treats memory as a schedulable and evolvable system resource. This structural gap remains a core bottleneck preventing LLMs from becoming persistent and collaborative intelligent agents. As application scenarios grow more complex, these limitations become particularly evident in the following four typical contexts.

从系统角度看,参数记忆和 RAG 都没有把记忆视为可调度、可演化的系统资源。 这一结构性缺口仍是阻止 LLM 成为持久、协作式智能体的核心瓶颈。 随着应用场景日益复杂,这些局限在以下四类典型情境中尤为明显。

  • Long-range Dependency Modeling: As tasks and dialogues grow in length, models must preserve instruction and state consistency across multiple turns or stages. However, current Transformer architectures face three major obstacles: limited context windows constrain input capacity, quadratic attention cost leads to high compute overhead, and user instructions often detach from model behavior over long horizons. For example, in complex tasks, user-defined code structures or writing styles are frequently forgotten, and model outputs revert to default modes. As LLMs are deployed in multi-turn dialogue, long-form generation, and persistent workflows, long-context—and even infinite-context—will become a general requirement rather than a rare exception. This limitation indicates the lack of mechanisms for persistent state maintenance and structured context retention.
  • Adapting to Knowledge Evolution: Real-world knowledge evolves continuously (e.g., legal updates, scientific discoveries, current events), but static parameters prevent timely reflection. RAG allows dynamic retrieval, yet remains a stateless patching mechanism lacking unified versioning, provenance, or temporal awareness. For instance, it may cite outdated and new regulations simultaneously without reconciliation. It cannot retire obsolete facts, prioritize reliable ones, or track knowledge evolution—limiting long-term consistency.
  • Personalization and Multi-role Support: LLMs lack durable “memory traces” across users, roles, or tasks. Each session resets to a blank state, ignoring accumulated preferences or styles. Although tools like ChatGPT and Claude now offer memory, issues persist: capacity limits, unstable access, opaque updates, and missing editability. Current systems emphasize passive recording over structured control, making them ill-suited for long-term personalization across diverse use cases.
  • Cross-platform Memory Migration and Ecosystem Diversity: As LLMs expand from single interfaces to multi-end deployments (web, mobile, enterprise), user memories (e.g., profiles, task history, preferences) should persist across contexts. Yet most systems trap memory within specific instances, forming “memory islands.” For example, ideas explored in ChatGPT can't carry over to Cursor, forcing context rebuilding. This impairs continuity and blocks memory reuse. Deeper yet, centralization vs. decentralization poses a systemic challenge: while monopolized platforms benefit from feedback loops, distributed models risk stagnation. Making memory portable and reusable is key to balancing evolution efficiency with ecosystem diversity.
  • 长程依赖建模: 随着任务和对话变长,模型必须在多个轮次或阶段之间保持指令与状态一致。然而,当前 Transformer 架构面临三项主要障碍:有限的上下文窗口限制输入容量,二次方注意力成本带来高昂计算开销,而用户指令在长时间跨度上经常与模型行为脱节。例如,在复杂任务中,用户定义的代码结构或写作风格经常被遗忘,模型输出会退回默认模式。随着 LLM 被部署到多轮对话、长文本生成和持久工作流中,长上下文乃至无限上下文将成为普遍要求,而非少见例外。这一局限表明系统缺少持久状态维护和结构化上下文保留机制。
  • 适应知识演化: 现实世界的知识持续变化,例如法规更新、科学发现和时事变化,但静态参数无法及时反映这些变化。RAG 允许动态检索,却仍是一种无状态的修补机制,缺乏统一版本、来源信息和时间感知。例如,它可能同时引用过时法规和新法规,却不加协调。它无法淘汰陈旧事实、优先采用可靠信息或追踪知识演化,从而限制长期一致性。
  • 个性化与多角色支持: LLM 缺乏跨用户、角色或任务的持久“记忆痕迹”。每次会话都会重置为空白状态,忽略已积累的偏好或风格。尽管 ChatGPT 和 Claude 等工具如今提供记忆功能,但容量限制、访问不稳定、更新不透明和缺乏可编辑性等问题仍然存在。当前系统偏重被动记录而非结构化控制,因此不适合跨多样化用例实现长期个性化。
  • 跨平台记忆迁移与生态多样性: 随着 LLM 从单一界面扩展到 Web、移动端和企业端等多端部署,用户记忆(例如画像、任务历史和偏好)应当跨上下文持续存在。然而,大多数系统将记忆困在特定实例中,形成“记忆孤岛”。例如,在 ChatGPT 中探索的想法无法迁移到 Cursor,迫使用户重建上下文。这会损害连续性并阻碍记忆复用。更深层次上,中心化与去中心化构成系统性挑战:垄断平台可受益于反馈循环,而分布式模型则面临停滞风险。让记忆可移植、可复用,是平衡演化效率与生态多样性的关键。

A review of the four challenges reveals a shared pattern: models lack the ability to coherently manage and coordinate information distributed across time and space. This is not due to any single failing module, but to the absence of a system-level mechanism for organizing and operating over memory. Modern LLMs lack an intermediate layer between parametric storage and external retrieval, making it difficult to manage memory lifecycle, integrate evolving knowledge, or maintain behavioral continuity. While RAG provides access to external information, its lack of unified structure and operational semantics prevents long-term, controllable use of knowledge.

回顾这四项挑战可以发现一个共同模式:模型缺乏连贯管理与协调跨时间和空间分布的信息的能力。 这并非由某个单一模块失效所致,而是因为系统缺少组织和操作记忆的系统级机制。 现代 LLM 在参数存储与外部检索之间缺少中间层,因而难以管理记忆生命周期、整合演化中的知识或维持行为连续性。 虽然 RAG 提供了访问外部信息的能力,但其缺乏统一结构和操作语义,无法长期、可控地使用知识。

Therefore, we argue that building future-capable language intelligence systems requires treating memory as a system-level resource that can be explicitly modeled and scheduled. In modern operating systems, computational resources (CPU), storage (RAM/disks), and communication (I/O) are uniformly scheduled and managed across their lifecycle. In contrast, memory in large model architectures exists as implicit parameters or temporary retrievals—neither schedulable nor traceable, and incapable of integration or transfer. Therefore, the key to enhancing memory in LLMs is not simply “adding a cache” or “attaching an external retrieval module,” but redefining the operational logic and resource management of memory from a systems-level perspective.

因此,我们认为,构建面向未来的语言智能系统,需要把记忆视为可显式建模和调度的系统级资源。 在现代操作系统中,计算资源(CPU)、存储资源(内存/磁盘)和通信资源(I/O)都在完整生命周期内接受统一调度与管理。 相比之下,大模型架构中的记忆以隐式参数或临时检索结果存在,既不可调度、不可追踪,也无法整合或迁移。 因此,增强 LLM 记忆的关键并非简单地“增加缓存”或“挂接外部检索模块”,而是从系统级视角重新定义记忆的操作逻辑和资源管理方式。

To address these challenges, we propose MemOS (Memory Operating System), a dedicated memory operating system designed for large language models. The core philosophy of MemOS is that, in order to fully utilize temporally and spatially distributed information, models require a unified framework for organizing memory, maintaining internal state, and supporting long-term adaptation. Inspired by recent work on memory hierarchy for improving model efficiency and adaptability, MemOS extends this idea into a system-level design by modeling memory as schedulable and evolvable resource units. It builds a modular architecture around the memory lifecycle—including generation, activation, fusion, archiving, and expiration—supported by components such as MemReader, MemScheduler, MemLifecycle, and MemOperator, which together orchestrate memory flow, state transitions, and access control.

为应对这些挑战,我们提出 MemOS(Memory Operating System),一种专为大语言模型设计的记忆操作系统。 MemOS 的核心理念是:为了充分利用在时间和空间上分布的信息,模型需要一个统一框架来组织记忆、维护内部状态并支持长期适应。 受近期使用记忆层次结构提升模型效率与适应性的工作启发,MemOS 将这一思想扩展为系统级设计,把记忆建模为可调度、可演化的资源单元。 它围绕记忆生命周期构建模块化架构,覆盖生成、激活、融合、归档和过期,并由 MemReaderMemSchedulerMemLifecycleMemOperator 等组件共同协调记忆流动、状态转换和访问控制。

Much like traditional operating systems coordinate CPU, memory, and I/O, MemOS provides an abstraction layer and unified Memory API, enabling consistent and auditable access to memory units across users, tasks, and sessions. The system supports structured storage, provenance tagging, lifecycle tracking, and fine-grained permission enforcement, forming a scalable foundation for memory-driven reasoning. More importantly, MemOS lays a cognitive foundation for the next generation of AGI systems with long-term memory and continual evolution, and provides efficient infrastructure for memory-centric architectural innovation. The system provides three core capabilities:

正如传统操作系统协调 CPU、内存和 I/O 一样,MemOS 提供抽象层和统一的 Memory API,使不同用户、任务和会话能够以一致且可审计的方式访问记忆单元。 系统支持结构化存储、来源标记、生命周期追踪和细粒度权限执行,为记忆驱动的推理构建可扩展基础。 更重要的是,MemOS 为具备长期记忆和持续演化能力的下一代 AGI 系统奠定认知基础,并为以记忆为中心的架构创新提供高效基础设施。 系统提供三项核心能力:

  • Controllability: MemOS offers full lifecycle management of memory units, enabling unified scheduling of memory creation, activation, fusion, and disposal. It implements multi-level permission control and context-aware activation strategies, ensuring safety and traceability in multi-task and multi-user environments through access control and operation auditing. For instance, user preference memories can be scoped to specific agent instances and automatically expire or archive after task completion.
  • Plasticity: MemOS supports memory restructuring and migration across tasks and roles. It provides memory slicing, tagging, hierarchical mapping, and context binding capabilities, allowing developers or systems to construct highly adaptable memory structures based on inference objectives. This enables models to activate different memory views for different tasks or update memory associations dynamically during role transitions, facilitating rapid cognitive adaptation and behavior shaping.
  • Evolvability: MemOS enables dynamic transitions and unified scheduling among different memory types—including parameter memory (knowledge embedded in model weights), activation memory (contextual inference state), and plaintext memory (structured knowledge fragments). The system supports seamless transitions, such as converting user-defined rules from multiple dialogues into active memory, or compressing long-term structured knowledge into parametric form. This cross-memory adaptation provides a robust foundation for knowledge integration, autonomous learning, and model evolution.
  • 可控性: MemOS 对记忆单元实施完整生命周期管理,可统一调度记忆的创建、激活、融合和处置。它实现多级权限控制和上下文感知激活策略,并通过访问控制和操作审计确保多任务、多用户环境中的安全性与可追踪性。例如,用户偏好记忆可以限定在特定智能体实例内,并在任务完成后自动过期或归档。
  • 可塑性: MemOS 支持跨任务和角色的记忆重组与迁移。它提供记忆切片、标记、层次映射和上下文绑定能力,使开发者或系统能够根据推理目标构建高度自适应的记忆结构。模型因此可以为不同任务激活不同记忆视图,或在角色转换时动态更新记忆关联,从而实现快速认知适应和行为塑造。
  • 可演化性: MemOS 支持不同记忆类型之间的动态转换和统一调度,包括参数记忆(嵌入模型权重的知识)、激活记忆(上下文推理状态)和纯文本记忆(结构化知识片段)。系统支持无缝转换,例如把多轮对话中用户定义的规则转化为激活记忆,或把长期结构化知识压缩为参数形式。这种跨记忆适应为知识整合、自主学习和模型演化提供坚实基础。

Therefore, as a novel infrastructure for the continual evolution of LLMs, MemOS aims to reconstruct the representation, management, and scheduling of memory from a systems perspective. It addresses core limitations in structured memory, lifecycle management, and multi-source integration, while providing OS-level support for cross-task adaptation, cross-modal evolution, and cross-platform migration. The introduction of MemOS marks a critical transition in the development of large models: from mere perception and generation to memory and evolution.

因此,作为支持 LLM 持续演化的新型基础设施,MemOS 旨在从系统视角重构记忆的表示、管理和调度。 它解决结构化记忆、生命周期管理和多来源整合方面的核心局限,同时为跨任务适应、跨模态演化和跨平台迁移提供操作系统级支持。 MemOS 的提出标志着大模型发展中的关键转变:从单纯的感知与生成,走向记忆与演化。

2. Memory in Large Language Models

Research in memory capabilities in large language models has generally progressed through four key stages: (1) The stage of definition and exploration, which focuses on categorizing and analyzing LLM memory systems from multiple perspectives, while identifying effective optimization mechanisms applicable in real-world scenarios. (2) The stage of human-like memory development, which addresses performance gaps in complex tasks arising from discrepancies between LLM and human memory by introducing various forms of cognitively inspired memory mechanisms. (3) The stage of tool-based memory management, where modular interfaces for memory operations begin to emerge, yet are largely limited to basic insert, delete, and update functionalities over existing memory structures. Our proposed MemOS introduces operating system–inspired resource management mechanisms to LLM memory, offering standardized and unified interfaces for full-lifecycle memory management and scheduling. This paves the way toward (4) The stage of systematic memory governance, enabling structured evolution, abstraction, and secure control over memory resources. In this subsection, we review existing research on memory in large models along this developmental trajectory.

大语言模型记忆能力研究总体经历了四个关键阶段:(1)定义与探索阶段,从多个视角对 LLM 记忆系统进行分类与分析,并识别适用于现实场景的有效优化机制。 (2)类人记忆发展阶段,通过引入多种认知启发式记忆机制,解决 LLM 记忆与人类记忆差异在复杂任务中造成的性能差距。 (3)工具化记忆管理阶段,记忆操作的模块化接口开始出现,但主要局限于对现有记忆结构执行基本的插入、删除和更新。 我们提出的 MemOS 将受操作系统启发的资源管理机制引入 LLM 记忆,为全生命周期记忆管理和调度提供标准化、统一的接口。 这为进入 (4)系统化记忆治理阶段 铺平道路,使记忆资源能够结构化演化、抽象并接受安全控制。 本节沿着这一发展轨迹回顾大模型记忆的现有研究。

Evolution of memory systems in LLMs

图3:大语言模型记忆系统的演进:从定义与探索,到类人记忆发展,再到工具化记忆管理。

2.1 Stage 1: Memory Definition and Exploration

Several recent studies have proposed systematic classifications and analyses of memory in LLMs from various dimensions. For example, Du et al. categorize memory into three types: parameter memory, unstructured contextual memory, and structured contextual memory. Wu et al. classify memory based on object (personal vs. system), form (parametric vs. non-parametric), and temporal aspects (short-term vs. long-term). Shan et al. further divide memory into four types: parameter-based, key-value cache-based, hidden state-based, and text-based, and introduce retention duration as a standard to distinguish sensory memory, short-term memory, and long-term memory.

近期多项研究从不同维度对 LLM 记忆提出了系统分类与分析。 例如,Du 等人将记忆分为参数记忆、非结构化上下文记忆和结构化上下文记忆三类。 Wu 等人根据对象(个人与系统)、形式(参数化与非参数化)和时间属性(短期与长期)对记忆进行分类。 Shan 等人进一步将记忆分为基于参数、基于键值缓存、基于隐藏状态和基于文本四类,并引入保留时长作为区分感觉记忆、短期记忆和长期记忆的标准。

Building on these works, we propose that LLM memory can be characterized along two primary dimensions: implicit and explicit. Implicit memory includes parameter memory, key-value cache, and hidden states, while explicit memory involves text- and context-based information storage. Memory can be classified temporally as sensory, short-term, or long-term. Sensory memory captures fleeting impressions of perceptual input, with extremely short duration and no conscious processing. While traditionally treated as a separate stage, we include it under short-term memory for unified scheduling and handling of initial information. This work adopts this two-dimensional framework to analyze memory mechanisms in the first and second stages (see Figure 3 left, Table 1).

在这些工作的基础上,我们提出可以沿两个主要维度描述 LLM 记忆:隐式记忆显式记忆 隐式记忆包括参数记忆、键值缓存和隐藏状态,显式记忆则涉及基于文本和上下文的信息存储。 从时间上看,记忆可分为感觉记忆、短期记忆和长期记忆。 感觉记忆捕获感知输入的短暂印象,持续时间极短,也不经过有意识处理。 尽管它传统上被视为独立阶段,但为了统一调度和处理初始信息,我们将其纳入短期记忆。 本文采用这一二维框架分析第一和第二阶段的记忆机制(见图3左侧和表1)。

表1:记忆类型、机制和代表方法的分类。
TimescaleConsciousnessMechanismExample References
Short-termExplicitPrompt-Based ContextGPT-2, GPT-3, Prefix-Tuning, Prompt-Tuning, P-Tuning, P-Tuning v2, InstructGPT
ImplicitKey-Value Cache MechanismvLLM, StreamingLLM, H2O, LESS, KVQuant, RetrievalAttention, Memory³
Hidden State SteeringSteer, ICV, ActAdd, StyleVec, CAA, FreeCtrl, EasyEdit2
Activation Circuit ModulationSAC, DESTEIN, LM-Steer
Long-termExplicitNon-parametric Retrieval-Augmented GenerationkNN-LMs, MEMWALKER, Graph RAG, LightRAG, NodeRAG, HeteRAG, HyperGraphRAG, HippoRAG, PGRAG, Zep, A-MEM, Mem0
ImplicitParametric KnowledgeBERT, RLHF, CTRL, SLayer
Modular Parameter AdaptationLoRA, PRAG, DyPRAG, SERAC, CaliNet, DPM, GRACE
Parametric Memory EditingROME, MEMIT, AlphaEdit, AnyEdit, EasyEdit, AdaPLE, MEMAT
Implicit Memory in LLMs

Implicit Long-term Memory in LLMs. Through large-scale pretraining, LLMs encode syntactic structures, conceptual relationships, and language usage patterns from corpora into their weight matrices. These parameters serve as implicit long-term memory, internalized into the model's inherent capabilities. Although they lack explicit expression, they continuously influence language generation behavior, knowledge expression, and even semantic generalization.

LLM 中的隐式长期记忆。 通过大规模预训练,LLM 将语料中的句法结构、概念关系和语言使用模式编码到权重矩阵中。 这些参数充当隐式长期记忆,并被内化为模型的固有能力。 尽管它们没有显式表达形式,却持续影响语言生成行为、知识表达乃至语义泛化。

Training: In LLMs, training is the most fundamental and direct method for forming implicit long-term memory. For example, pretraining and post-training enable large-scale parameter updates, fundamentally reconstructing the internal knowledge distribution and behavioral structure of the model. Some studies introduce memory explicitly during training. For instance, CTRL includes control codes in training data to help models automatically associate contextual information during text generation. Memory&Reasoning fine-tunes the model to decouple output into separate memory and reasoning components, fully leveraging memory for inference. SLayer identifies memory-relevant layers in the model and locally fine-tunes them to enhance specific knowledge representation. It is worth noting that relying solely on memorization of training data can be limited in real-world deployment due to distributional shifts between real-world and training data. Titans proposes a dynamic memory mechanism by encoding historical information into neural network parameters and training a pluggable online meta-model. This meta-model can adaptively decide retention or forgetting strategies for specific data during real usage, thereby improving generalization across distribution shifts.

训练: 在 LLM 中,训练是形成隐式长期记忆最基本、最直接的方法。 例如,预训练和后训练可实现大规模参数更新,从根本上重构模型内部的知识分布与行为结构。 一些研究在训练期间显式引入记忆。 例如,CTRL 在训练数据中加入控制码,帮助模型在文本生成期间自动关联上下文信息。 Memory&Reasoning 对模型进行微调,将输出解耦为独立的记忆与推理组件,以充分利用记忆进行推理。 SLayer 识别模型中与记忆相关的层,并对其进行局部微调,以增强特定知识表示。 值得注意的是,由于现实数据与训练数据之间存在分布偏移,仅依靠记忆训练数据会限制真实部署效果。 Titans 通过把历史信息编码到神经网络参数中,并训练可插拔在线元模型,提出一种动态记忆机制。 该元模型可以在实际使用期间针对特定数据自适应决定保留或遗忘策略,从而提升跨分布偏移的泛化能力。

Adaptor: Full-scale training or fine-tuning is costly and often impractical for rapid memory updates in real-world scenarios. To address this, adapter-based methods freeze the core model parameters and introduce small, trainable modules that adapt quickly to new memory with minimal disruption to original capabilities. LoRA inserts low-rank adapters into the model, enabling lightweight parameter tuning without modifying the original parameter structure, supporting efficient loading and storage of implicit memory. PRAG treats LoRA adapter modules trained for specific documents or tasks as “memory units” and merges them into the main model as needed, enabling rapid access to specialized knowledge. Furthermore, DyPRAG introduces a neural generator that directly maps input documents to LoRA parameters, significantly reducing explicit memory storage cost.

适配器: 全量训练或微调成本高昂,在现实场景中往往不适合快速更新记忆。 为解决这一问题,基于适配器的方法冻结核心模型参数,并引入小型可训练模块,使其能快速适应新记忆,同时尽量减少对原有能力的干扰。 LoRA 在模型中插入低秩适配器,无需修改原始参数结构即可进行轻量级参数调优,从而支持高效加载和存储隐式记忆。 PRAG 将针对特定文档或任务训练的 LoRA 适配器模块视为“记忆单元”,并按需合并到主模型中,以便快速访问专业知识。 此外,DyPRAG 引入神经生成器,将输入文档直接映射为 LoRA 参数,显著降低显式记忆的存储成本。

Editing: Memory editing refers to targeted interventions on model parameters to induce new knowledge or behaviors for specific inputs while preserving existing capabilities as much as possible. Most existing research focuses on editing objective factual knowledge, such as correcting answers to questions like “Who is the president of the United States?” However, memory in LLMs also includes abstract competencies such as language style, semantic preferences, and reasoning modes, for which systematic editing methods are still lacking. If not carefully controlled, local parameter edits can lead to undesirable global behavior shifts. Thus, edit precision and retention of existing capabilities are key evaluation metrics. This paper categorizes knowledge editing techniques into three types: (1) Locate-then-edit intuitive methods: These methods use causal tracing to locate where the target knowledge is stored, followed by targeted parameter updates. (2) Meta-learning-based methods: These use hypernetworks to directly predict parameter changes. Another important direction is preserving prior knowledge and abilities during editing. (3) Adapter-based editing strategies: These preserve the LLM backbone, offering a degree of edit controllability.

编辑: 记忆编辑是指针对模型参数实施定向干预,为特定输入引入新知识或行为,同时尽可能保留既有能力。 现有大多数研究聚焦于编辑客观事实知识,例如纠正“美国总统是谁?”这类问题的答案。 然而,LLM 的记忆还包括语言风格、语义偏好和推理模式等抽象能力,而针对这些能力仍缺少系统化编辑方法。 如果缺少谨慎控制,局部参数编辑可能引发不希望出现的全局行为变化。 因此,编辑精确性和既有能力保留程度是关键评测指标。 本文将知识编辑技术分为三类:(1)先定位再编辑的直观方法: 这类方法利用因果追踪定位目标知识的存储位置,随后执行定向参数更新。 (2)基于元学习的方法: 这类方法使用超网络直接预测参数变化。 另一个重要方向是在编辑期间保留先验知识和能力。 (3)基于适配器的编辑策略: 这类方法保留 LLM 骨干,从而提供一定程度的编辑可控性。

Implicit Short-term Memory in LLMs. Beyond the internalized parametric long-term memory, LLMs also depend on dynamically generated and transient intermediate representations during inference—such as KV-caches and hidden states. Although these representations lack explicit forms, they continually influence attention distributions and behavioral strategies in autoregressive generation, forming the implicit short-term memory of LLMs. They play a vital role in maintaining contextual coherence, enabling instant control, and facilitating behavior transition, and have become a crucial entry point for understanding and enhancing dynamic capabilities of language models.

LLM 中的隐式短期记忆。 除内化的参数长期记忆外,LLM 在推理期间还依赖动态生成、短暂存在的中间表示,例如 KV 缓存和隐藏状态。 尽管这些表示没有显式形式,但它们持续影响自回归生成中的注意力分布和行为策略,构成 LLM 的隐式短期记忆。 它们在维持上下文连贯性、实现即时控制和促进行为转换方面发挥重要作用,也已成为理解和增强语言模型动态能力的重要切入点。

KV-cache: KV-cache stores key-value representations of previously processed tokens, enabling persistent access to historical memory during autoregressive generation. Although users cannot directly manipulate these caches, they implicitly modulate attention and output behavior during inference. Subsequent optimization work has focused primarily on improving compute and memory efficiency. Techniques such as low-rank compression and quantization are adopted by LESS and KVQuant, while StreamingLLM and H₂O dynamically prune less relevant KV pairs based on attention patterns. More recent studies introduce retrieval-based memory activation, enabling selective access to cached content. Meanwhile, vLLM draws from operating system design by implementing PagedAttention—using virtual memory-style page caching to reduce redundant storage and improve KV access.

KV 缓存: KV 缓存存储已处理 token 的键值表示,使模型在自回归生成期间能够持续访问历史记忆。 尽管用户无法直接操纵这些缓存,但它们会在推理期间隐式调节注意力和输出行为。 后续优化工作主要聚焦于提升计算与内存效率。 LESS 和 KVQuant 采用低秩压缩与量化等技术,而 StreamingLLM 和 H₂O 根据注意力模式动态剪除相关性较低的 KV 对。 更近期的研究引入基于检索的记忆激活,使系统能够选择性访问缓存内容。 与此同时,vLLM 借鉴操作系统设计,实现 PagedAttention,使用类似虚拟内存的分页缓存减少冗余存储并改善 KV 访问。

While most existing work focuses on optimizing KV-cache for inference efficiency, its capacity to represent structured and controllable knowledge remains underexplored. Memory³ takes a first step in this direction by encoding external knowledge bases as sparse key-value pairs, which are injected into the model’s self-attention layers. This enables dynamic, non-parametric retrieval of relevant information during inference, effectively externalizing knowledge and improving memory controllability—offering new directions for the structured use of short-term memory. Building on the foundation laid by Memory³, MemOS advances the notion of structured memory by proposing the first hierarchical memory architecture for LLMs that models and unifies three distinct substrates: plaintext memory, activation memory, and parameter memory. It introduces an integrated retrieval and scheduling framework that enables explicit control, efficient fusion, and dynamic activation. The MemCube module further organizes semantic fragments into a multi-dimensional structure, enabling query-based aggregation and multi-granularity activation—paving the way for more systematic and scalable memory utilization in LLMs.

现有大多数工作侧重于优化 KV 缓存的推理效率,但其表示结构化、可控知识的能力仍未得到充分探索。 Memory³ 在这一方向上迈出第一步:把外部知识库编码为稀疏键值对,并注入模型的自注意力层。 这使模型能够在推理期间动态、非参数化地检索相关信息,有效外部化知识并提高记忆可控性,为结构化使用短期记忆提供新方向。 在 Memory³ 奠定的基础上,MemOS 进一步发展结构化记忆概念,提出首个面向 LLM 的分层记忆架构,对纯文本记忆、激活记忆和参数记忆三种不同载体进行建模与统一。 它引入集成式检索与调度框架,实现显式控制、高效融合和动态激活。 MemCube 模块进一步把语义片段组织为多维结构,支持基于查询的聚合和多粒度激活,为更系统、可扩展地利用 LLM 记忆铺平道路。

Hidden States: Hidden states represent the layer-wise intermediate activations within LLMs during processing, encoding the model's semantic understanding and generation trajectory. Compared to modifying model parameters, directly manipulating hidden states offers a more flexible, instantaneous, and efficient means of memory control. Among the various mechanisms, steering vectors stand out as a representative method. These vectors are derived by computing activation differences between inputs with contrasting semantic attributes, forming directionally meaningful control signals. Injecting such vectors into the intermediate activations of other inputs can steer generation toward specific semantic directions without altering the model architecture. To avoid reliance on supervised corpora, methods like Self-Detoxifying, ActAdd, ICV, StyleVec, and CAA propose unsupervised contrastive approaches. These construct semantically similar yet attribute-opposing input pairs (e.g., emotion, stance, politeness) to extract hidden state differences and generate steering vectors, enabling automated, lightweight signal derivation. This not only enhances the portability of steerable control but also lowers its entry barrier. As an implicit short-term memory mechanism, hidden states have been validated in various practical tasks. For example, steering vectors have been employed in hallucination mitigation and factual consistency enhancement in ACT, ITI, and InferAligner. IFS extends their application to controlling low-level generation features such as text formatting and sentence length, indicating that hidden state interventions are effective not only for abstract semantics but also for structural behavior modulation.

隐藏状态: 隐藏状态表示 LLM 处理过程中的逐层中间激活,编码模型的语义理解和生成轨迹。 与修改模型参数相比,直接操纵隐藏状态提供了更灵活、即时且高效的记忆控制方式。 在各种机制中,导向向量是一种代表性方法。 这类向量通过计算具有相反语义属性的输入之间的激活差异得到,形成具有明确方向意义的控制信号。 把这些向量注入其他输入的中间激活,可以在不改变模型架构的情况下,把生成引导到特定语义方向。 为避免依赖监督语料,Self-Detoxifying、ActAdd、ICV、StyleVec 和 CAA 等方法提出无监督对比方案。 这些方法构造语义相似但属性相反的输入对(例如情绪、立场、礼貌程度),提取隐藏状态差异并生成导向向量,从而自动、轻量地获得控制信号。 这不仅提升可导向控制的可移植性,也降低了其使用门槛。 作为一种隐式短期记忆机制,隐藏状态已在多种实际任务中得到验证。 例如,ACT、ITI 和 InferAligner 使用导向向量缓解幻觉并增强事实一致性。 IFS 将其应用扩展到文本格式和句子长度等低层生成特征的控制,表明隐藏状态干预不仅适用于抽象语义,也能调节结构化行为。

Explicit Memory in LLMs

Explicit Short-term Memory in LLMs. LLMs' explicit short-term memory primarily resides in their input context window—namely, the prompt and directly concatenated historical dialogues, including user task descriptions, interaction history, and reference documents. These explicitly injected elements are directly perceived and utilized during inference, forming the basis for understanding the current context and generating responses. With the increasing scale and capabilities of LLMs, their ability to manage explicit short-term memory has significantly improved. From early general-purpose language models relying on static text input, to parameterized prompt techniques using learnable continuous vectors, to advanced instruction-following models, and the InstructGPT-style instruction tuning paradigm, mechanisms for expressing and managing explicit short-term memory have evolved from static configuration to dynamic interaction, becoming increasingly structured and flexible. However, explicit short-term memory in LLMs is physically constrained by context window length. When handling lengthy texts or multi-turn dialogues, models often encounter truncation of early content and memory fading, leading to diminished semantic coherence or loss of key information. Recent research has attempted to alleviate these bottlenecks through longer windows, external retrieval, or more efficient caching, yet the capacity of explicit short-term memory remains a key limiting factor in real-time comprehension and interaction.

LLM 中的显式短期记忆。 LLM 的显式短期记忆主要位于输入上下文窗口中,即提示和直接拼接的历史对话,包括用户任务描述、交互历史和参考文档。 这些显式注入的元素在推理期间被直接感知和利用,构成理解当前上下文和生成响应的基础。 随着 LLM 规模和能力提升,它们管理显式短期记忆的能力也显著增强。 从依赖静态文本输入的早期通用语言模型,到使用可学习连续向量的参数化提示技术,再到先进的指令遵循模型和 InstructGPT 式指令调优范式,显式短期记忆的表达与管理机制已从静态配置演变为动态交互,并越来越结构化、灵活化。 然而,LLM 的显式短期记忆在物理上受上下文窗口长度限制。 处理长文本或多轮对话时,模型经常遇到早期内容被截断和记忆衰退,导致语义连贯性下降或关键信息丢失。 近期研究尝试通过更长窗口、外部检索或更高效缓存缓解这些瓶颈,但显式短期记忆容量仍是实时理解与交互的关键限制因素。

Explicit Long-term Memory in LLMs. Unlike short-term memory dependent on context windows, LLMs' explicit long-term memory emphasizes sustained access to external non-parametric knowledge, with a focus on optimizing memory organization structures and retrieval strategies. Early research focused on identifying effective retrieval mechanisms for recalling relevant content from standalone external memory stores. Common approaches include off-the-shelf retrievers such as BM25, Dense Passage Retrieval (DPR), and hybrid retrieval methods. However, such retrieve-then-generate approaches impose an inherent bottleneck in integrating retrieved content into model reasoning. Thus, some studies have explored tighter coupling of retrieval with inference. Non-parametric language models (NPLMs) such as kNN-LMs propose a linear fusion of neural language models (e.g., Transformers) with k-nearest-neighbor retrieval. At each prediction step, they retrieve top-matching context chunks from memory and blend their influence into the model’s output distribution to improve reference fidelity.

LLM 中的显式长期记忆。 与依赖上下文窗口的短期记忆不同,LLM 的显式长期记忆强调对外部非参数知识的持续访问,重点是优化记忆组织结构和检索策略。 早期研究聚焦于寻找有效检索机制,以从独立外部记忆库中回忆相关内容。 常见方法包括 BM25、稠密段落检索(DPR)等现成检索器,以及混合检索方法。 然而,这类先检索再生成的方法在把检索内容整合到模型推理中时存在固有瓶颈。 因此,一些研究探索了检索与推理之间更紧密的耦合。 kNN-LM 等非参数语言模型(NPLM)提出将神经语言模型(例如 Transformer)与 k 近邻检索线性融合。 在每个预测步骤,它们从记忆中检索最匹配的上下文块,并把其影响融入模型输出分布,以提高参考信息的忠实度。

Due to the limited representational capacity of flat memory structures, optimizing retrieval alone often fails to surpass performance ceilings. As a result, research has increasingly shifted toward enhancing memory organization itself. Traditional key-value formats have gradually evolved into more hierarchical and relational structures, such as tree-based and graph-based formats. To further represent diverse memory relationships, researchers have introduced heterogeneous graphs and hypergraph structures, enabling unified modeling and dynamic control of varied knowledge types and complex semantic links. These advances greatly enhance the expressive power and generalization of memory networks. To endow LLMs with structured, dynamic, and persistent memory, Zep builds on GraphRAG by adding timeline modeling to track memory evolution over time. A-MEM draws from dynamic memory networks to support automatic memory linking and semantic updating, allowing LLM memory to evolve across multi-turn interactions.

由于扁平记忆结构的表示能力有限,仅优化检索往往无法突破性能上限。 因此,研究越来越多地转向增强记忆组织本身。 传统键值格式逐渐演变为更具层次性和关系性的结构,例如树结构和图结构。 为了进一步表示多样化的记忆关系,研究者引入异构图和超图结构,以统一建模并动态控制多种知识类型和复杂语义连接。 这些进展显著增强了记忆网络的表达能力和泛化能力。 为了赋予 LLM 结构化、动态且持久的记忆,Zep 在 GraphRAG 基础上加入时间线建模,追踪记忆随时间的演化。 A-MEM 借鉴动态记忆网络,支持自动记忆链接和语义更新,使 LLM 记忆能够在多轮交互中持续演化。

2.2 Stage 2: Development of Human-like Memory

To enhance the memory capabilities of LLMs in complex tasks, some studies have drawn inspiration from human memory mechanisms and knowledge management methods, proposing various forms of human-like memory. In the early stages of human-like memory research, the focus was on simulating the structural and functional mechanisms of human memory. One representative early work is the HippoRAG series of models, inspired by the “hippocampal indexing theory” in human long-term memory. The model integrates LLMs, knowledge graphs, and the Personalized PageRank algorithm to emulate the roles of the neocortex and hippocampus in memory, achieving more efficient knowledge integration and retrieval. Memory³, inspired by the hierarchical structure of human memory, makes the KV-cache in the attention mechanism explicit as a memory carrier for the model. This approach offers a lower-cost alternative to parameter storage or traditional RAG, significantly reducing the resource consumption for training and inference.

为了增强 LLM 在复杂任务中的记忆能力,一些研究从人类记忆机制和知识管理方法中获得启发,提出多种形式的类人记忆。 在类人记忆研究早期,重点是模拟人类记忆的结构与功能机制。 一项代表性早期工作是 HippoRAG 系列模型,其灵感来自人类长期记忆中的“海马体索引理论”。 该模型整合 LLM、知识图谱和个性化 PageRank 算法,模拟新皮层与海马体在记忆中的作用,从而实现更高效的知识整合与检索。 Memory³ 受人类记忆层次结构启发,将注意力机制中的 KV 缓存显式化,作为模型的记忆载体。 该方法为参数存储或传统 RAG 提供成本更低的替代方案,显著减少训练和推理的资源消耗。

As research advanced, system designs began emphasizing human-like behavior and function, simulating how humans actually use memory. For instance, PGRAG mimics the act of note-taking during reading, automatically generating mind maps as explicit long-term memory to enhance organization and durability. Second-Me proposes a multi-level architecture centered on human-like memory behaviors, emphasizing experience-driven personalized retrieval. The system consists of three layers: L0 retains raw data for completeness; L1 enhances organization and retrievability through structured natural language; L2 internalizes user preferences via parameter tuning, enabling associative reasoning similar to humans. AutoGen introduces a multi-agent framework to simulate human group collaboration, forming a dialog ecosystem of interacting agents. Each agent has distinct roles, and they collaborate through dialog to share information and accomplish complex tasks like mathematical reasoning, information retrieval, and code generation.

随着研究推进,系统设计开始强调类人行为与功能,模拟人类实际使用记忆的方式。 例如,PGRAG 模仿阅读时记笔记的行为,自动生成思维导图作为显式长期记忆,以增强组织性和持久性。 Second-Me 提出以类人记忆行为为中心的多层架构,强调由经验驱动的个性化检索。 该系统由三层组成:L0 保留原始数据以确保完整性;L1 通过结构化自然语言增强组织性和可检索性;L2 通过参数调优内化用户偏好,实现类似人类的联想推理。 AutoGen 引入多智能体框架模拟人类群体协作,形成由交互智能体构成的对话生态。 每个智能体承担不同角色,并通过对话协作共享信息,完成数学推理、信息检索和代码生成等复杂任务。

2.3 Stage 3: Tool-based Memory Management

With the growing understanding of memory in LLMs, researchers have begun exploring explicit manipulation of knowledge, pushing memory management from implicit representations toward tool-based interfaces. This stage witnessed the emergence of standardized frameworks for memory editing, enabling users to dynamically update the model’s semantic behavior through insert, modify, and delete operations. For example, early approaches like EasyEdit offer unified interfaces to manipulate model parameters and hidden states for fine-grained control. Another representative line of work is Mem0, which targets the context window bottleneck by introducing external memory modules maintained through extract-update workflows. Follow-ups to Mem0 even structure conversational memory into graphs to enable richer semantic modeling and long-term evolution. Among these, Letta stands out as a system-oriented attempt. It draws inspiration from traditional operating systems by modularizing context and introducing function-style paging for dynamic memory access. However, most work in this stage remains limited to interface-level utilities. While tool-based management introduces basic CRUD operations, it lacks systematic modeling and governance of memory as a core resource—making it insufficient for tasks requiring memory evolution, coordination, or security.

随着对 LLM 记忆的理解不断深入,研究者开始探索显式操纵知识,推动记忆管理从隐式表示转向工具化接口。 这一阶段出现了标准化记忆编辑框架,使用户能够通过插入、修改和删除操作动态更新模型的语义行为。 例如,EasyEdit 等早期方法提供统一接口,操纵模型参数和隐藏状态以实现细粒度控制。 另一条代表性路线是 Mem0,它通过引入由抽取—更新工作流维护的外部记忆模块,应对上下文窗口瓶颈。 Mem0 的后续工作甚至把对话记忆组织为图,以实现更丰富的语义建模和长期演化。 其中,Letta 是一项突出的系统化尝试。 它从传统操作系统中汲取灵感,将上下文模块化,并引入函数式分页以动态访问记忆。 然而,这一阶段的大多数工作仍局限于接口级工具。 尽管工具化管理引入了基本的增删改查操作,但它缺乏把记忆作为核心资源进行系统建模和治理的能力,因此不足以支持需要记忆演化、协调或安全性的任务。

2.4 Stage 4: Systematic Memory Governance

Although tool-based management introduces explicit memory operation interfaces, it essentially patches implicit mechanisms. CRUD capabilities alleviate short-term issues but fall short of addressing systemic challenges like memory evolution, access control, and version management. Just as system calls alone cannot build a complete OS, “tooling” memory lacks a sustainable and scalable governance architecture. To overcome the limitations of tool-based management, we propose MemOS, a memory operating system purpose-built for LLMs, marking the entry into the stage of systematic memory governance. MemOS treats memory units as first-class resources and builds upon operating system design principles to introduce comprehensive governance mechanisms including scheduling, layering, API abstraction, permission control, and exception handling. Unlike the tool-based phase, MemOS not only enables operations but also emphasizes the evolution and integration of memory across tasks, sessions, and agent roles. With core modules such as MemScheduler, Memory Layering, and Memory Governance, MemOS enables unified scheduling and behavior-driven evolution of heterogeneous memory types—building a long-term cognitive structure essential for AGI. We envision the “memory-as-OS” paradigm pioneered by MemOS as the infrastructural backbone for future general-purpose agents, enabling sustainable knowledge accumulation and self-evolution.

尽管工具化管理引入了显式记忆操作接口,但其本质仍是对隐式机制的修补。 增删改查能力可以缓解短期问题,却不足以解决记忆演化、访问控制和版本管理等系统性挑战。 正如仅靠系统调用无法构建完整操作系统一样,把记忆“工具化”也缺少可持续、可扩展的治理架构。 为克服工具化管理的局限,我们提出专为 LLM 构建的记忆操作系统 MemOS,标志着系统化记忆治理阶段的到来。 MemOS 将记忆单元视为一等资源,并以操作系统设计原则为基础,引入调度、分层、API 抽象、权限控制和异常处理等完整治理机制。 与工具化阶段不同,MemOS 不仅支持操作,还强调记忆跨任务、会话和智能体角色的演化与整合。 通过 MemScheduler、Memory Layering 和 Memory Governance 等核心模块,MemOS 对异构记忆类型实施统一调度和行为驱动演化,构建 AGI 所需的长期认知结构。 我们设想由 MemOS 开创的“记忆即操作系统”范式将成为未来通用智能体的基础设施骨干,支持可持续的知识积累和自我演化。

3. MemOS Design Philosophy

3.1 Vision of MemOS

As AGI advances toward increasingly complex systems involving multiple tasks, roles, and modalities, LLMs must go beyond merely “understanding the world”—they must also “accumulate experience,” “retain memory,” and “continuously evolve.” However, current mainstream LLM architectures lack systematic support for memory as a core intelligence capability: knowledge is rigidly encoded in parameters, context cannot be preserved across sessions, personalization cannot be retained, and knowledge updates are prohibitively expensive. We argue that the next-generation LLM architecture must adopt a memory-centric design paradigm.

随着 AGI 迈向涉及多任务、多角色和多模态的日益复杂系统,LLM 不能只“理解世界”,还必须“积累经验”“保留记忆”并“持续演化”。 然而,当前主流 LLM 架构缺乏对记忆这一核心智能能力的系统性支持:知识被僵化地编码在参数中,上下文无法跨会话保存,个性化无法保留,而知识更新成本高得难以承受。 我们认为,下一代 LLM 架构必须采用以记忆为中心的设计范式。

As shown in Figure 4, model performance is approaching the upper limits predicted by traditional scaling laws. The prevailing research paradigm is transitioning from data- and parameter-centric pretraining to post-training, which emphasizes reinforcement alignment and instruction tuning. Yet this shift faces two major challenges: diminishing returns and growing system complexity. To unlock the next leap in capability, we must transcend the current paradigm by incorporating continuous memory modeling and dynamic memory scheduling—thereby enabling long-term knowledge accumulation, task adaptation, and behavioural evolution.

图4所示,模型性能正接近传统缩放定律预测的上限。 主流研究范式正在从以数据和参数为中心的预训练转向强调强化对齐与指令调优的后训练。 然而,这一转变面临两项主要挑战:收益递减和系统复杂度增加。 要实现能力的下一次跃升,我们必须超越当前范式,引入持续记忆建模和动态记忆调度,从而支持长期知识积累、任务适应和行为演化。

Beyond the temporal benefits of continual learning, memory training also introduces a spatial scaling effect. Thousands of heterogeneously deployed model instances can gather experience in situ and exchange compact memory units—rather than expensive parameters or gradients—to build a collective knowledge base. This memory-parallel regime blurs the line between training and deployment, effectively extending data parallelism to a society-scale, distributed intelligence ecosystem. Two technical challenges arise:

  • efficient knowledge exchange across highly heterogeneous environments, and
  • strict governance that protects private or sensitive data while maximising shared utility.

除持续学习带来的时间维度收益外,记忆训练还会引入空间缩放效应。 成千上万个异构部署的模型实例可以在现场收集经验,并交换紧凑的记忆单元,而不是昂贵的参数或梯度,从而构建集体知识库。 这种记忆并行机制模糊了训练与部署的界线,实际上把数据并行扩展为社会规模的分布式智能生态系统。 由此产生两项技术挑战:

  • 在高度异构的环境中高效交换知识;
  • 在最大化共享效用的同时,通过严格治理保护隐私或敏感数据。

MemOS scaling law

图4:模型性能的阶段性转变:从预训练和后训练进入 Mem-training 阶段。MemOS 是支撑下一代缩放定律的基础设施。

We therefore advocate a memory-centric training strategy—the Mem-training Paradigm. Instead of relying solely on sporadic parameter updates, Mem-training drives continuous evolution through explicit, controllable memory units. Unlike traditional workflows that modify the model only during pretraining or fine-tuning, Mem-training allows knowledge to be collected, re-structured, and propagated at runtime, enabling self-adaptation across tasks, time horizons, and deployment environments.

因此,我们倡导一种以记忆为中心的训练策略,即 Mem-training 范式。 Mem-training 不再仅依赖零散的参数更新,而是通过显式、可控的记忆单元推动持续演化。 传统工作流只在预训练或微调期间修改模型,而 Mem-training 允许在运行时收集、重组和传播知识,使模型能够跨任务、时间跨度和部署环境进行自适应。

In this paradigm, “training” is no longer limited to large-scale corpora but extends to dynamic knowledge accumulation via continuous interaction with users and the environment. The focus shifts from how much knowledge the model learns once to whether it can transform experience into structured memory and repeatedly retrieve and reconstruct it. MemOS serves as the system-level foundation for this paradigm, enabling end-to-end capabilities in memory generation, scheduling, fusion, and updating. Our vision is for MemOS to become the foundational memory infrastructure for next-generation intelligent agents, with its core mission expressed through the following three pillars:

在这一范式中,“训练”不再局限于大规模语料,而是扩展为通过与用户和环境持续交互进行动态知识积累。 关注点从模型一次学到了多少知识,转向它能否把经验转化为结构化记忆,并反复检索和重构这些记忆。 MemOS 是这一范式的系统级基础,提供从记忆生成、调度、融合到更新的端到端能力。 我们的愿景是让 MemOS 成为下一代智能体的基础记忆设施,其核心使命体现在以下三大支柱中:

  • Memory as a System Resource: Abstract memory from a latent, internal dependency into a first-class, schedulable, and manageable resource. Build memory pathways that span agents, users, applications, and sessions, breaking down “memory silos” across platforms, significantly reducing memory management complexity, and improving the effectiveness and efficiency of memory access.
  • Evolution as a Core Capability: Enable continuous learning, structural reorganization, and task transfer throughout long-term memory usage. Build a co-evolutionary infrastructure for models and memory, allowing LLMs to self-adapt and upgrade in response to changing tasks, environments, and feedback—achieving truly sustainable, evolving intelligence.
  • Governance as the Foundation for Safety: Provide lifecycle-wide memory governance mechanisms including access control, versioning, provenance auditing, and more. Ensure controllability, traceability, and explainability of memory, laying the groundwork for secure, trustworthy, and compliant intelligent agent systems.
  • 记忆作为系统资源: 将记忆从潜在的内部依赖抽象为一等、可调度、可管理的资源。构建跨越智能体、用户、应用和会话的记忆路径,打破跨平台的“记忆孤岛”,显著降低记忆管理复杂度,并提高记忆访问的效果与效率。
  • 演化作为核心能力: 在长期记忆使用过程中支持持续学习、结构重组和任务迁移。构建模型与记忆协同演化的基础设施,使 LLM 能够响应不断变化的任务、环境和反馈,自我适应并升级,实现真正可持续、可演化的智能。
  • 治理作为安全基础: 提供覆盖整个生命周期的记忆治理机制,包括访问控制、版本管理、来源审计等。确保记忆可控、可追踪、可解释,为安全、可信且合规的智能体系统奠定基础。

We believe that just as traditional operating systems laid the foundation for modern computing by unifying computation and storage management, MemOS will elevate memory to a core system resource, forming an indispensable foundation for both general-purpose and embodied intelligent agents. This will drive a paradigm shift from reactive, perception-based systems to memory-driven, evolving agents.

我们相信,正如传统操作系统通过统一计算和存储管理为现代计算奠定基础一样,MemOS 将把记忆提升为核心系统资源,成为通用智能体和具身智能体不可或缺的基础。 这将推动系统从被动、感知驱动的范式转向记忆驱动、持续演化的智能体范式。

3.2 From Computer OS to Memory OS

In traditional computing systems, the operating system (OS) centrally manages key hardware resources—such as the central processing unit (CPU), memory, storage devices, and peripherals—to support efficient execution and stable operation of applications. The OS’s abstraction of resources, unified scheduling, and lifecycle governance serve as the foundation for the scalability and reliability of modern computing infrastructures.

在传统计算系统中,操作系统(OS)集中管理中央处理器(CPU)、内存、存储设备和外围设备等关键硬件资源,以支持应用高效执行和稳定运行。 操作系统对资源的抽象、统一调度和生命周期治理,是现代计算基础设施可扩展性与可靠性的基础。

As large language models (LLMs) scale in inference and application complexity, both internal and external memory resources—ranging from static parameter memory to runtime activation memory and dynamically retrieved explicit memory modules—exhibit increasingly dynamic and heterogeneous behavior. These memory forms are not only foundational to inference but also continuously evolve with task shifts and knowledge updates. Therefore, LLMs similarly require a systematic resource management framework akin to traditional operating systems, enabling standardized abstraction, dynamic scheduling, and autonomous lifecycle governance of memory.

随着大语言模型(LLM)的推理和应用复杂度不断增长,从静态参数记忆、运行时激活记忆到动态检索的显式记忆模块,内部和外部记忆资源都呈现出日益动态和异构的行为。 这些记忆形式不仅是推理的基础,还会随着任务变化和知识更新持续演化。 因此,LLM 同样需要类似传统操作系统的系统化资源管理框架,以实现记忆的标准化抽象、动态调度和自主生命周期治理。

MemOS proposes a design philosophy for the unified and systematic management of memory resources in LLMs, drawing extensively on mature mechanisms from traditional OS domains such as resource scheduling, interface abstraction, access control, and fault handling. Table 2 illustrates the mapping between classical OS components and MemOS modules: MemOS coordinates inference and memory block scheduling via the LLM Core and MemScheduler, manages hierarchical memory through Memory Layering and MemStore, offers standardized API abstraction through MemAPI and Backend Adapter, enforces security and access governance through Memory Governance, and supports monitoring and anomaly detection through the Memory Observability framework. These modules work in concert to adapt traditional resource management principles to the evolving demands of memory in LLMs.

MemOS 提出统一、系统化管理 LLM 记忆资源的设计理念,广泛借鉴传统操作系统在资源调度、接口抽象、访问控制和故障处理等领域的成熟机制。 表2展示了经典操作系统组件与 MemOS 模块之间的映射:MemOS 通过 LLM Core 和 MemScheduler 协调推理与记忆块调度,通过 Memory Layering 和 MemStore 管理分层记忆,通过 MemAPI 和 Backend Adapter 提供标准化 API 抽象,通过 Memory Governance 执行安全与访问治理,并通过 Memory Observability 框架支持监控和异常检测。 这些模块协同工作,使传统资源管理原则适应 LLM 记忆不断演化的需求。

表2:传统操作系统组件与 MemOS 模块的映射。
LayerOS ComponentMemOS ModuleRole
Core Operation Layer
Parameter MemoryRegisters / MicrocodeParameter MemoryLong-term ability
Activation MemoryCacheActivation MemoryFast working state
Plaintext MemoryI/O BufferPlaintext MemoryExternal episodes
Management Layer
SchedulingSchedulerMemSchedulerPrioritise ops
Persistent StoreFile SystemMemVaultVersioned store
System InterfaceSystem CallMemory APIUnified access
Backend DriverDevice DriverMemLoader / DumperMove memories
Package DeployPackage ManagerMemStoreShare bundles
Governance & Observability
Auth / ACLsAuth Module, ACLsMemGovernanceAccess control
LoggingSyslogAudit LogAudit trail
Fault HandlingExcp. HandlerError RecoveryError recover

4. Memory Modeling in MemOS

4.1 Types of Memory in MemOS

The concept of hierarchical memory was originally introduced in our prior work Memory³, which proposed a distinction between explicit and implicit memory paths in LLMs and investigated their interaction mechanisms. Building on this foundation, MemOS systematizes the idea by delineating three core memory types—Plaintext Memory, Activation Memory, and Parameter Memory—that together reflect a full semantic evolution trajectory from perception to consolidation. To coordinate scheduling and evolution across heterogeneous memory types, MemOS introduces the MemCube—a unified abstraction that standardizes memory representation, lifecycle management, cross-modal fusion, and dynamic memory state transitions. Its design is inspired by the controllable externalization proposed in Memory³, while advancing it into a composable and schedulable memory substrate suitable for intelligent agent construction. This design forms the semantic memory backbone of MemOS, enabling seamless integration and transformation of multiple memory types during inference.

分层记忆的概念最初由我们此前的 Memory³ 工作提出,该工作区分了 LLM 中的显式和隐式记忆路径,并研究了二者的交互机制。 在此基础上,MemOS 对这一思想进行系统化,将记忆划分为三种核心类型:纯文本记忆激活记忆参数记忆,三者共同反映从感知到巩固的完整语义演化轨迹。 为了协调异构记忆类型之间的调度和演化,MemOS 引入 MemCube,这一统一抽象对记忆表示、生命周期管理、跨模态融合和动态记忆状态转换进行标准化。 其设计受到 Memory³ 中可控外部化思想的启发,并进一步将其发展为适合构建智能体的可组合、可调度记忆基底。 这一设计构成 MemOS 的语义记忆骨干,使多种记忆类型能够在推理过程中无缝集成和转换。

Plaintext Memory. Plaintext memory refers to explicit, dynamically retrieved knowledge modules accessed via external interfaces—editable, traceable, and storable independently. Examples include retrieved passages, structured graphs, and prompt templates. Injected into model input, it bypasses the limitations of parameter capacity and context window size. It enables rapid knowledge updates, task customization, and user personalization.

纯文本记忆。 纯文本记忆指通过外部接口访问的显式、动态检索知识模块,它们可以编辑、追踪并独立存储。 相关示例包括检索段落、结构化图和提示模板。 将其注入模型输入,可以绕过参数容量和上下文窗口大小的限制。 它支持快速知识更新、任务定制和用户个性化。

MemOS encapsulates plaintext memory into tunable MemCubes, with lifecycle control, access policies, and version tracking. It supports graph-structured and multimodal memory, contextual fingerprinting, and timestamp-based loading. Plaintext memory is not merely an external plugin. MemOS deeply integrates it into the inference loop, enabling interaction with activation memory. High-frequency plaintext can be transformed into activation paths, achieving dynamic externalization and internalization of knowledge. To enhance scheduling efficiency and long-term evolvability, MemOS manages plaintext memory in a hierarchical graph structure organized by task–concept–fact paths. Task parsing combined with semantic similarity and topic-aware strategies enables structured query routing and prioritized retrieval. It supports conflict detection, deduplication, versioning, and forgetting policies to maintain memory quality and evolution. Plaintext memory is particularly suited for fact-heavy, personalized, and multi-agent tasks—serving as a core enabler of transparent and collaborative intelligence.

MemOS 将纯文本记忆封装为可调优的 MemCube,并提供生命周期控制、访问策略和版本追踪。 它支持图结构记忆和多模态记忆、上下文指纹以及基于时间戳的加载。 纯文本记忆并不只是外部插件。 MemOS 将其深度集成到推理循环中,使其能够与激活记忆交互。 高频纯文本可以转换为激活路径,实现知识的动态外部化和内部化。 为提高调度效率和长期可演化性,MemOS 使用按任务—概念—事实路径组织的分层图结构管理纯文本记忆。 任务解析与语义相似度和主题感知策略相结合,支持结构化查询路由和优先级检索。 它还支持冲突检测、去重、版本管理和遗忘策略,以维持记忆质量和演化。 纯文本记忆尤其适合事实密集、个性化和多智能体任务,是实现透明协作智能的核心支撑。

Activation Memory. Activation memory consists of intermediate states generated during inference, with the KV-cache as the central structure. It retains key-value representations of context, enabling efficient long-range dependency modeling and recursive reasoning. It supports instant contextual response and reusable inference pathways through cache-stable behaviors. Other elements include hidden states (hil) and attention weights (αijl), comprising the model’s runtime semantic perception. These are characterized as short-term, dynamic, and implicitly activated.

激活记忆。 激活记忆由推理期间生成的中间状态组成,其核心结构是 KV 缓存。 它保留上下文的键值表示,从而支持高效的长程依赖建模和递归推理。 它通过缓存稳定行为支持即时上下文响应和可复用的推理路径。 其他组成还包括隐藏状态(hil)和注意力权重(αijl),共同构成模型运行时的语义感知。 这些记忆具有短期、动态和隐式激活的特点。

MemOS offers unified scheduling and lifecycle management for activation memory. It enables lazy loading, selective freezing, and priority-driven adjustments. Frequent KV patterns are cached to form low-latency “instant memory paths”. Beyond KV patterns, strategic behaviors that are repeatedly triggered can also be abstracted into persistent memory structures, such as steering vectors or semantic templates. KV memory proves valuable in multi-turn dialogue, code assistance, and runtime safety management. For instance, in medical agent systems, stable and frequently accessed knowledge—such as patient histories, routine diagnostic procedures, or clinical commonsense—can be abstracted into cached KV segments, enabling rapid recall and minimizing redundant decoding. It is essential for maintaining contextual continuity, stylistic coherence, and precise response control.

MemOS 为激活记忆提供统一调度和生命周期管理。 它支持惰性加载、选择性冻结和优先级驱动的调整。 频繁出现的 KV 模式会被缓存,形成低延迟的“即时记忆路径”。 除 KV 模式外,反复触发的策略行为也可以抽象为持久记忆结构,例如引导向量或语义模板。 KV 记忆在多轮对话、代码辅助和运行时安全管理中很有价值。 例如,在医疗智能体系统中,患者病史、常规诊断流程或临床常识等稳定且频繁访问的知识,可以抽象为缓存的 KV 片段,以实现快速回忆并减少重复解码。 它对于保持上下文连续性、风格一致性和精确响应控制至关重要。

Parameter Memory. Parameter memory refers to knowledge and capabilities encoded in the model’s fixed weights. It serves as the primary repository of long-term semantic knowledge within the model. It encodes deep representations of linguistic structure, commonsense knowledge, and general semantics—typically instantiated as feedforward weight matrices (e.g., WMLPl) and attention key/value matrices (e.g., WKl, WVl). Unlike other memory types, parameter memory is activated implicitly without retrieval or explicit context, forming the foundation for zero-shot inference, general QA, and language generation.

参数记忆。 参数记忆指编码在模型固定权重中的知识和能力。 它是模型内部长期语义知识的主要存储载体。 它编码语言结构、常识知识和一般语义的深层表示,通常体现为前馈权重矩阵(例如 WMLPl)和注意力键值矩阵(例如 WKlWVl)。 与其他记忆类型不同,参数记忆无需检索或显式上下文便会被隐式激活,是零样本推理、通用问答和语言生成的基础。

In MemOS, parameter memory includes both pre-trained linguistic and world knowledge and can be modularly enhanced via lightweight fine-tuning methods such as LoRA or adapters. MemOS enables distilling domain-specific knowledge into parameter blocks, loadable as “capability modules” (e.g., summarization expert, legal assistant, style generator). While offering strong expressivity and high efficiency, parameter memory suffers from high update costs, limited customizability, and poor interpretability. To address this, MemOS links parameter memory with plaintext and activation memories. For instance, frequently used and structurally stable plaintext may be distilled into parametric form for embedded efficiency. Conversely, outdated or inconsistent parameter memory can be backpatched by reverting to plaintext. Parameter memory is ideal for capability-centric agents, such as legal advisors, financial auditors, technical writers, or summarizers, or as composable “capability plugins”. Compared with frequently updated plaintext or transient activation memory, it better supports long-term, structurally stable capabilities.

在 MemOS 中,参数记忆既包括预训练获得的语言和世界知识,也可以通过 LoRA 或适配器等轻量微调方法进行模块化增强。 MemOS 可以把领域特定知识蒸馏为参数块,并将其作为“能力模块”加载,例如摘要专家、法律助手或风格生成器。 参数记忆虽然具有很强的表达能力和较高效率,却面临更新成本高、可定制性有限和可解释性差的问题。 为此,MemOS 将参数记忆与纯文本记忆和激活记忆连接起来。 例如,频繁使用且结构稳定的纯文本可以蒸馏为参数形式,以提高内嵌知识的效率。 相反,过时或不一致的参数记忆可以通过回退为纯文本进行修补。 参数记忆适合以能力为中心的智能体,例如法律顾问、财务审计员、技术写作者或摘要器,也可以作为可组合的“能力插件”。 与频繁更新的纯文本记忆或短暂的激活记忆相比,它更适合支持长期、结构稳定的能力。

Memory transformations

图5:三种记忆类型之间的转换路径,形成统一、可控且可演化的记忆空间。

4.2 Memory Cube (MemCube) as a Core Resource

In MemOS, the foundation of a unified and structured memory management system lies in the standardized abstraction and system-level governance of heterogeneous memory resources. To this end, we propose the Memory Cube (MemCube) as a universal encapsulation unit for memory resources (see Figure 6). Memory in LLMs is highly diverse, spanning long-term knowledge embedded in model parameters, intermediate activation states generated during inference, and externally injected structured knowledge fragments (e.g., retrieved passages, knowledge graph nodes). These resources differ significantly in origin, lifecycle, representation, and scheduling method, making unified control, evolution, and governance a systemic challenge.

在 MemOS 中,统一结构化记忆管理系统的基础,在于对异构记忆资源进行标准化抽象和系统级治理。 为此,我们提出 Memory Cube(MemCube 作为记忆资源的通用封装单元(见图6)。 LLM 中的记忆非常多样,包括嵌入模型参数的长期知识、推理期间生成的中间激活状态,以及从外部注入的结构化知识片段,例如检索段落和知识图谱节点。 这些资源在来源、生命周期、表示和调度方式上差异显著,因此统一控制、演化和治理成为一项系统性挑战。

The design of MemCube aims to encapsulate all memory types as unified scheduling units, each with standard interfaces, behavioral properties, and governance strategies. Each MemCube instance consists of two components: the Memory Payload, which contains the semantic content, and the Metadata, which encodes identity, control, and behavioral metrics. These metadata elements serve as foundational interfaces for MemOS scheduling and governance and as central anchors for long-term system evolution, task adaptation, and security control.

MemCube 旨在把所有记忆类型封装为统一调度单元,每个单元都具有标准接口、行为属性和治理策略。 每个 MemCube 实例由两部分组成:包含语义内容的 Memory Payload,以及编码身份、控制信息和行为指标的 Metadata 这些元数据既是 MemOS 调度和治理的基础接口,也是系统长期演化、任务适应和安全控制的核心锚点。

MemCube

图6:MemCube:用于异构记忆调度的统一封装结构。每个 MemCube 由结构化元数据头和记忆载荷组成;前者支持生命周期、权限和存储策略,后者封装纯文本、激活状态或参数增量。它是 MemOS 中可被调度并为下游推理组合的最小记忆单元。

The metadata of each MemCube is categorized into three groups: descriptive identifiers, governance attributes, and behavioral usage indicators. Together, these enable full-spectrum memory management across structural identification, access control, and behavioral evolution. We elaborate below on their motivations, components, and system-level implications.

每个 MemCube 的元数据分为三组:描述性标识符治理属性行为使用指标 它们共同支持覆盖结构识别、访问控制和行为演化的全方位记忆管理。 下面我们详细说明其动机、组成和系统级影响。

Descriptive Identifiers define each memory block's identity, classification, and organization. Unified memory scheduling at scale relies on precise identification of these “semantic fingerprints.” MemCube embeds key fields such as: Timestamp, indicating creation or last update for lifecycle modeling; Origin Signature, identifying whether the memory comes from inference extraction, user input, external retrieval, or parameter finetuning; and Semantic Type, specifying its use (e.g., task prompt, fact, user preference) to support semantic composition. These jointly enable layered memory structuring and contextual navigation.

描述性标识符 定义每个记忆块的身份、分类和组织方式。 大规模统一记忆调度依赖对这些“语义指纹”的精确识别。 MemCube 嵌入多项关键字段:时间戳 表示创建或最后更新时间,用于生命周期建模;来源签名 标识记忆来自推理抽取、用户输入、外部检索还是参数微调;语义类型 说明记忆用途,例如任务提示、事实或用户偏好,以支持语义组合。 这些字段共同支持分层记忆组织和上下文导航。

Governance Attributes provide systemic controls for memory access, security, and scheduling. In dynamic, multi-user, long-running systems, default model reasoning is insufficient for robust memory governance. MemOS defines a comprehensive rule set per memory unit, including: Access Control (read/write/share scope), Lifespan Policy (TTL or decay rules), Priority Level (for scheduling), and Compliance & Traceability (e.g., sensitivity tags, watermarks, logs). Together, they form the memory governance kernel—critical for system stability, transparency, and accountability.

治理属性 为记忆访问、安全和调度提供系统控制。 在动态、多用户、长期运行的系统中,模型的默认推理不足以实现稳健的记忆治理。 MemOS 为每个记忆单元定义完整规则集,包括访问控制(读取、写入和共享范围)、生命周期策略(TTL 或衰减规则)、优先级(用于调度)以及合规与可追踪性(例如敏感标签、水印和日志)。 它们共同构成记忆治理内核,对系统稳定性、透明度和问责能力至关重要。

Behavioral Usage Indicators reflect real-time memory usage during inference, enabling “value-driven” scheduling and cross-type transformation. Unlike static labels, these runtime metrics empower adaptive orchestration of memory. Access Patterns, such as frequency and recency, inform whether a memory is “hot” or “cold” during inference. MemOS uses this to adjust caching priority—for example, promoting high-frequency plaintext memory into fast-access layers to reduce latency. These indicators also support Cross-Modality Memory Transformation, allowing dynamic transitions across memory types:

行为使用指标 反映推理期间的实时记忆使用情况,从而支持“价值驱动”的调度和跨类型转换。 与静态标签不同,这些运行时指标赋予系统自适应编排记忆的能力。 频率和最近访问时间等 访问模式 可以判断一段记忆在推理期间是“热”还是“冷”。 MemOS 据此调整缓存优先级,例如把高频纯文本记忆提升到快速访问层以降低延迟。 这些指标还支持跨模态记忆转换,使记忆类型可以动态转换:

  • Plaintext Activation: Frequently used plaintext memory can be pre-transformed into activation vectors or attention templates for faster decoding.
  • Plaintext/Activation Parameter: Stable knowledge across tasks can be distilled into parameter modules, internalized as efficient capability plugins.
  • Parameter Plaintext: Cold or outdated parameters can be offloaded into external plaintext storage to increase flexibility and reduce structural overhead.
  • 纯文本 激活: 经常使用的纯文本记忆可以预先转换为激活向量或注意力模板,以加快解码。
  • 纯文本/激活 参数: 跨任务的稳定知识可以蒸馏为参数模块,并内部化为高效的能力插件。
  • 参数 纯文本: 冷参数或过时参数可以卸载到外部纯文本存储,以提高灵活性并减少结构开销。

To support such transformations, MemOS introduces Policy-Aware Scheduling: the system dynamically adjusts a memory block’s tier and format based on usage frequency, contextual dependency, and task fit—enabling layered memory evolution. Additionally, each memory is associated with a Contextual Fingerprint, a lightweight semantic signature for fast retrieval and task alignment. A Version Chain logs each memory’s modification history and derivation lineage, enabling version control, conflict resolution, and rollback. These behavioral metrics allow MemOS to perceive the “value” of memory, forming the basis for adaptive scheduling, memory transformation, and knowledge evolution. As a result, memory becomes a self-regulating and self-evolving intelligent resource unit. Through the coordinated design of these three metadata types, MemCube enables structured abstraction, permissioned control, and behavior-driven evolution of heterogeneous memory resources.

为支持这些转换,MemOS 引入策略感知调度:系统根据使用频率、上下文依赖和任务适配度,动态调整记忆块的层级和格式,从而实现分层记忆演化。 此外,每段记忆都关联一个上下文指纹,即用于快速检索和任务对齐的轻量语义签名。 版本链 记录每段记忆的修改历史和派生谱系,从而支持版本控制、冲突解决和回滚。 这些行为指标使 MemOS 能够感知记忆的“价值”,并成为自适应调度、记忆转换和知识演化的基础。 因此,记忆成为能够自我调节和自我演化的智能资源单元。 通过三类元数据的协同设计,MemCube 实现了异构记忆资源的结构化抽象、权限控制和行为驱动演化。

5. Architecture of MemOS

MemOS framework

图7:MemOS 框架概览。该架构展示了从用户输入出发,经过接口层中的语义解析和 API 抽象,到操作层中的记忆调度与生命周期控制,最终与基础设施层交互以完成记忆注入、检索和治理的完整流程。统一数据结构 MemCube 是模型执行期间动态记忆流动的基础。

5.1 Overview: Three-layer Architecture of MemOS

MemOS adopts a modular three-layer architecture to support efficient invocation, dynamic scheduling, and compliant governance of complex memory tasks (see Figure 7). It consists of the Interface Layer, Operation Layer, and Infrastructure Layer, each with distinct responsibilities and collaborative interfaces—together building a unified execution and governance framework for heterogeneous memory types that enables robust intelligent agent performance across complex tasks.

MemOS 采用模块化三层架构,以支持复杂记忆任务的高效调用、动态调度和合规治理(见图7)。 它由接口层、操作层和基础设施层组成,每层都有明确职责和协作接口,共同构建异构记忆类型的统一执行与治理框架,使智能体能够在复杂任务中稳定运行。

Memory Interface Layer. The interface layer interacts with users or upstream systems and serves as the entry point for all memory operations. It provides a standardized Memory API suite that supports querying, writing, updating, transferring, and composing memory units. All user requests are parsed by the interface layer into specific memory manipulation commands. The built-in MemReader module plays a central role in this process. It converts natural language inputs into structured memory operation chains, extracting time expressions, task intents, contextual anchors, and memory scopes. For instance, given a request like “Summarize my meeting notes from last month,” MemReader extracts the time range (last month), memory type (meeting notes), and output target (summary), and formulates a labeled MemoryQuery with proper window parameters. In multi-turn conversations, MemReader uses context to infer omitted details, ensuring consistency in memory invocation. This layer also performs permission checks, parameter encapsulation, and call sequence management. It coordinates with MemGovernance to validate the compliance and traceability of every operation.

记忆接口层。 接口层与用户或上游系统交互,是所有记忆操作的入口。 它提供标准化的 Memory API 套件,支持查询、写入、更新、迁移和组合记忆单元。 接口层会把所有用户请求解析为具体的记忆操作命令。 内置的 MemReader 模块在这一过程中发挥核心作用。 它把自然语言输入转换为结构化记忆操作链,抽取时间表达、任务意图、上下文锚点和记忆范围。 例如,面对“总结我上个月的会议记录”这一请求,MemReader 会抽取时间范围(上个月)、记忆类型(会议记录)和输出目标(摘要),并构造带有适当窗口参数的标记化 MemoryQuery 在多轮对话中,MemReader 利用上下文推断省略细节,以保证记忆调用的一致性。 这一层还执行权限检查、参数封装和调用顺序管理。 它与 MemGovernance 协作,验证每项操作的合规性和可追踪性。

Memory Operation Layer. The operation layer serves as the control center of MemOS, organizing, planning, and scheduling memory resources during inference. Its core components include MemOperator, which builds tag systems, semantic indexes, and graph-based topologies across heterogeneous memory types and contexts, facilitating efficient retrieval and contextual adaptation. MemScheduler selects appropriate memory types (e.g., Plaintext, activation, parameter) based on task intent and context, and dynamically plans invocation order and integration strategy to optimize for low latency and task relevance. MemLifecycle tracks the lifecycle transitions of each memory unit—creation, activation, expiration, and reclamation—to ensure memory resource controllability and freshness. In a multi-turn QA or complex dialogue, the operation layer first retrieves relevant memory (e.g., user preferences, past conversations, external structured documents) via MemOperator, determines the optimal invocation path via MemScheduler, and updates memory states using MemLifecycle. Thanks to this design, memory becomes a dynamic, context-aware resource rather than a static data fragment.

记忆操作层。 操作层是 MemOS 的控制中心,负责在推理期间组织、规划和调度记忆资源。 其核心组件包括 MemOperator,它跨异构记忆类型和上下文构建标签系统、语义索引和图拓扑,以支持高效检索和上下文适应。 MemScheduler 根据任务意图和上下文选择适当的记忆类型,例如纯文本、激活或参数记忆,并动态规划调用顺序和集成策略,以优化低延迟和任务相关性。 MemLifecycle 追踪每个记忆单元从创建、激活到过期和回收的生命周期转换,确保记忆资源可控且保持新鲜。 在多轮问答或复杂对话中,操作层先通过 MemOperator 检索用户偏好、历史对话、外部结构化文档等相关记忆,再通过 MemScheduler 确定最优调用路径,并使用 MemLifecycle 更新记忆状态。 得益于这一设计,记忆不再是静态数据片段,而成为动态、上下文感知的资源。

Memory Infrastructure Layer. The infrastructure layer handles storage, security, migration, and flow of memory data, serving as the foundation for reliable system execution. MemGovernance enforces access control, retention policies, audit logging, and sensitive content handling. MemVault manages multiple memory repositories (e.g., user-specific, domain knowledge, shared pipelines) and provides standardized access interfaces. MemLoader and MemDumper enable memory import/export and cross-platform synchronization. MemStore provides a publish-subscribe mechanism for open memory sharing among multiple agents. In organizational QA systems, for instance, a locally updated memory entry can be validated and synchronized to a central memory hub, becoming available to authorized users. Together, these three layers form the complete memory operation loop in MemOS—from task input to execution scheduling to governance and archival. The standard interface decoupling allows rapid iteration and extensibility, laying the foundation for multi-model, multi-task, and cross-platform memory sharing in future intelligent systems.

记忆基础设施层。 基础设施层处理记忆数据的存储、安全、迁移和流动,是系统可靠执行的基础。 MemGovernance 负责执行访问控制、保留策略、审计日志和敏感内容处理。 MemVault 管理用户专属、领域知识和共享流水线等多个记忆仓库,并提供标准化访问接口。 MemLoaderMemDumper 支持记忆导入、导出和跨平台同步。 MemStore 为多个智能体之间的开放记忆共享提供发布—订阅机制。 例如,在组织问答系统中,本地更新的记忆条目可以经过验证并同步到中央记忆中心,供获授权的用户使用。 这三层共同构成 MemOS 完整的记忆操作闭环,从任务输入到执行调度,再到治理和归档。 标准接口解耦支持快速迭代和扩展,并为未来智能系统中的多模型、多任务和跨平台记忆共享奠定基础。

5.2 Execution Path and Interaction Flow of MemOS

MemOS execution flow

图8:MemOS 架构和记忆交互流程概览。系统由接口层、操作层和基础设施层组成;从左到右展示从用户输入到解析、调度、注入和响应生成的完整记忆处理流水线。各阶段通过协同模块调用完成,MemoryCube 作为跨层载体,支持结构化、可治理、可追踪的记忆生命周期管理。

The execution of MemOS is triggered by either user interaction or automated tasks. It follows a closed-loop process through input parsing, memory scheduling, state management, and storage archiving (Figure 8).

MemOS 的执行由用户交互或自动任务触发。 它通过输入解析、记忆调度、状态管理和存储归档形成闭环流程(见图8)。

Prompt Input and Memory API Packaging. System execution begins with a user-issued natural language prompt or an automatically triggered task. The interface layer processes the input through the built-in MemReader module, which identifies task intent, time scope, topic entities, and contextual anchors to determine if memory access is involved. If so, MemReader converts the prompt into a structured MemoryCall, including the caller ID, context scope, memory type, access intent, and time window. This is encapsulated into a standardized Memory API request and passed to the operation layer for execution. For example, in a healthcare scenario, when a patient inputs, “Please retrieve my inpatient records from last year,” MemReader identifies the time range (last year), topic tag (diagnostic records), contextual anchor (hospitalization period), and intent (historical query), and generates a structured MemoryCall, which proceeds to the memory retrieval and scheduling pipeline.

提示输入与 Memory API 封装。 系统执行从用户发出的自然语言提示或自动触发的任务开始。 接口层通过内置 MemReader 模块处理输入,识别任务意图、时间范围、主题实体和上下文锚点,以判断是否涉及记忆访问。 如果涉及,MemReader 会把提示转换为结构化 MemoryCall,其中包含调用者 ID、上下文范围、记忆类型、访问意图和时间窗口。 这些信息被封装为标准化 Memory API 请求,并传递给操作层执行。 例如,在医疗场景中,当患者输入“请检索我去年的住院记录”时,MemReader 会识别时间范围(去年)、主题标签(诊断记录)、上下文锚点(住院期间)和意图(历史查询),生成结构化 MemoryCall,并进入记忆检索和调度流水线。

Memory Retrieval and Organization. The MemOperator in the operation layer uses intent and context info from the Memory API to perform semantic matching and organize memory units. It constructs task-specific indexes (user preferences, anchors, keyword vectors) and memory graphs (temporal chains, entity relations, dependencies) to filter relevant candidates. For instance, if a patient asks the system to reference past cases for diagnosis, the operator retrieves memory blocks with symptom keywords, treatment periods, and associated physician notes to construct a structured retrieval path.

记忆检索与组织。 操作层中的 MemOperator 使用 Memory API 提供的意图和上下文信息进行语义匹配并组织记忆单元。 它构建任务专属索引(用户偏好、锚点和关键词向量)以及记忆图(时间链、实体关系和依赖),以筛选相关候选项。 例如,如果患者要求系统参考历史病例进行诊断,操作器会检索带有症状关键词、治疗周期和相关医生记录的记忆块,构建结构化检索路径。

Memory Scheduling and Activation. After the candidate set is identified, MemScheduler optimizes memory selection using metrics like contextual similarity, access frequency, temporal decay, and priority tags. It dynamically computes the optimal injection strategy. In a follow-up appointment, the system injects recent consultation summaries (activation memory), diagnosis templates (parameter memory), and lifestyle advice (plaintext memory), ensuring integrated, semantically coherent support.

记忆调度与激活。 确定候选集合后,MemScheduler 使用上下文相似度、访问频率、时间衰减和优先级标签等指标优化记忆选择。 它动态计算最优注入策略。 在复诊中,系统会注入近期问诊摘要(激活记忆)、诊断模板(参数记忆)和生活方式建议(纯文本记忆),以提供整合且语义一致的支持。

Lifecycle Modeling and State Transitions. Scheduled memory units are passed to MemLifecycle for state management. Each memory item transitions through five states—Generated, Activated, Merged, Archived, and Expired—based on access patterns, time decay, and task labels. For example, in medical use, generated medication advice starts in “Generated” state. If frequently accessed, it becomes “Activated”; after repeated user confirmations, it is “Merged” into frequent-use suggestions; and eventually archived or expired if unused.

生命周期建模与状态转换。 调度后的记忆单元会传递给 MemLifecycle 进行状态管理。 每个记忆项根据访问模式、时间衰减和任务标签,在 Generated、Activated、Merged、Archived 和 Expired 五种状态间转换。 例如,在医疗应用中,生成的用药建议最初处于 Generated 状态。 如果被频繁访问,它会转为 Activated;经过用户反复确认后,会被 Merged 到常用建议中;如果长期不用,最终会被归档或过期。

Storage Archiving and Access Governance. Evolved memories are archived in MemVault and organized by user, task, or context. Archiving may be triggered by policy, user command, or scheduling, keeping frequently accessed data active and less-used data cold or long-term stored. The archiving phase also invokes MemGovernance for permission encapsulation and compliance checks. Each memory unit is assigned a set of access control strategies—such as Access Control List (ACL), Time-To-Live (TTL), and conditional activation policies—that determine its availability based on user roles and task context. For example, a treatment summary may be fully visible to the care team but partially visible to the patient. After redaction and watermarking, it can be registered in MemStore for sharing across institutions. The full governance and archiving pipeline ensures that all memory units—across diverse modalities and agents—are handled in a structured, transparent, and traceable manner, maintaining compliance and efficiency across collaborative healthcare environments.

存储归档与访问治理。 演化后的记忆会归档到 MemVault,并按用户、任务或上下文组织。 归档可以由策略、用户命令或调度触发,使频繁访问的数据保持活跃,并把较少使用的数据转为冷数据或长期存储。 归档阶段还会调用 MemGovernance 进行权限封装和合规检查。 每个记忆单元都分配一组访问控制策略,例如访问控制列表(ACL)、生存时间(TTL)和条件激活策略,根据用户角色和任务上下文决定其可用性。 例如,治疗摘要可以对护理团队完全可见,但对患者只部分可见。 经过脱敏和加水印后,它可以注册到 MemStore,供不同机构共享。 完整的治理和归档流水线确保跨不同模态和智能体的所有记忆单元都以结构化、透明、可追踪的方式处理,并在协作医疗环境中维持合规性和效率。

5.3 Interface Layer

5.3.1 MemReader

In MemOS, the first step of any memory operation is interpreting natural language inputs from users or system tasks. This responsibility is handled by the MemReader, which serves as the semantic abstraction module for memory-level reasoning. It parses incoming prompts to extract key memory-related features—such as task intent, temporal scope, entity focus, memory type, and contextual anchors—and outputs a structured intermediate representation. For example, a prompt like “Remind me what the doctor said about my medication during last year's hospitalization” would be parsed by MemReader into a structured memory access plan: task intent (retrieval), time scope (last year), topic (medication guidance), and context anchor (hospitalization period). This plan is passed downstream as a MemoryCall to be processed by the memory operation layer. MemReader also supports prompt rewriting, coreference resolution, and dialogue memory slot filling across multi-turn interactions. It functions as both an intent recognizer and memory orchestrator, ensuring the system issues precise and traceable calls to the underlying memory infrastructure.

在 MemOS 中,任何记忆操作的第一步都是解释来自用户或系统任务的自然语言输入。 这一职责由 MemReader 承担,它是记忆级推理的语义抽象模块。 它解析输入提示,抽取任务意图、时间范围、实体焦点、记忆类型和上下文锚点等关键记忆特征,并输出结构化中间表示。 例如,提示“提醒我去年住院期间医生对我的用药说了什么”会被 MemReader 解析为结构化记忆访问计划:任务意图(检索)、时间范围(去年)、主题(用药指导)和上下文锚点(住院期间)。 这一计划会作为 MemoryCall 传递给下游记忆操作层处理。 MemReader 还支持跨多轮交互的提示改写、共指消解和对话记忆槽填充。 它既是意图识别器,也是记忆编排器,确保系统对底层记忆基础设施发出精确且可追踪的调用。

5.3.2 Memory API

The interface layer of MemOS is built around a unified and composable Memory API, which bridges upper-level tasks with backend memory operations. All memory-related actions—including creation, updates, retrieval, and auditing—are performed via standardized APIs that ensure extensibility, composability, and governance. Provenance API enables provenance tracking by embedding metadata into memory objects at creation or modification time. This includes event triggers, contextual state, model identifiers, and external links. Each memory is tagged with a unique provenance ID that persists throughout its lifecycle. Provenance metadata supports explainability, debugging, access control, and memory lineage tracing.

MemOS 的接口层围绕统一、可组合的 Memory API 构建,它连接上层任务与后端记忆操作。 创建、更新、检索和审计等所有记忆相关操作都通过标准化 API 完成,以保证可扩展性、可组合性和可治理性。 Provenance API 在创建或修改记忆对象时嵌入元数据,从而支持来源追踪。 这些元数据包括事件触发器、上下文状态、模型标识符和外部链接。 每段记忆都带有贯穿整个生命周期的唯一来源 ID。 来源元数据支持可解释性、调试、访问控制和记忆谱系追踪。

Update API supports mutation operations such as append, merge, or overwrite. It is version-aware, allowing snapshots and label-based differential writes. Typical use cases include task result logging, user correction, and fine-grained memory consolidation. When paired with MemLifecycle, update operations can trigger state transitions and index refreshes. LogQuery API allows structured access to memory access logs and execution traces. It supports filtering by timestamp, caller identity, memory type, and operation kind. It is essential for debugging, hotspot analysis, auditing, and governance enforcement. For instance, developers can investigate memory usage that led to faulty responses, or validate whether specific memories were invoked.

Update API 支持追加、合并或覆盖等变更操作。 它能够感知版本,支持快照和基于标签的差异写入。 典型用例包括记录任务结果、接受用户纠正和细粒度记忆巩固。 MemLifecycle 配合时,更新操作可以触发状态转换和索引刷新。 LogQuery API 支持对记忆访问日志和执行轨迹进行结构化访问。 它可以按时间戳、调用者身份、记忆类型和操作种类筛选。 它对于调试、热点分析、审计和治理执行至关重要。 例如,开发者可以调查导致错误响应的记忆使用情况,或验证某段特定记忆是否被调用。

All Memory API calls use MemoryCube as their parameter carrier and response format. They support transactional safety, structured status reporting, and are governed by MemGovernance, which enforces access control based on users, roles, models, and tasks.

所有 Memory API 调用都使用 MemoryCube 作为参数载体和响应格式。 它们支持事务安全和结构化状态报告,并受 MemGovernance 治理;后者根据用户、角色、模型和任务执行访问控制。

5.3.3 Memory Pipeline

To support complex workflows in enterprise and multi-agent settings, MemOS offers a pipeline-style composition mechanism for chaining memory operations. Developers or agent systems can define a sequence of memory actions—e.g., retrieve → augment → update → archive—and execute them as a cohesive pipeline. Each pipeline step operates on a shared MemoryCube object, which carries input-output state, metadata, and intermediate artifacts. For example, a medical assistant might define a pipeline that (1) retrieves past medication notes via LogQuery, (2) adds doctor’s latest instructions via Update, (3) tags the memory with a new provenance entry, and (4) archives it post-consultation.

为了支持企业和多智能体场景中的复杂工作流,MemOS 提供流水线式组合机制,用于串联记忆操作。 开发者或智能体系统可以定义检索 → 增强 → 更新 → 归档等记忆操作序列,并把它们作为连贯流水线执行。 每个流水线步骤都操作一个共享的 MemoryCube 对象,其中携带输入输出状态、元数据和中间产物。 例如,医疗助手可以定义一条流水线:(1)通过 LogQuery 检索既往用药记录;(2)通过 Update 添加医生的最新指导;(3)为记忆添加新的来源条目;(4)在问诊结束后将其归档。

Pipelines support transactional consistency, rollback, and fault isolation. They can be defined declaratively through a domain-specific language (DSL), or constructed programmatically. For agent orchestration, MemScheduler interprets dependencies across steps and coordinates scheduling. Pipeline templates can be reused across agents—e.g., for follow-up generation in customer support, or for diagnosis tracking in clinical triage. By enabling compositional memory flows, MemOS empowers developers to model higher-level cognition patterns, task-specific knowledge shaping, and auditable memory workflows.

流水线支持事务一致性、回滚和故障隔离。 它们既可以通过领域专用语言(DSL)声明式定义,也可以通过程序构建。 在智能体编排中,MemScheduler 解释各步骤之间的依赖并协调调度。 流水线模板可以跨智能体复用,例如用于生成客户支持回访内容,或在临床分诊中追踪诊断过程。 通过支持可组合的记忆流,MemOS 使开发者能够建模更高层认知模式、塑造任务专属知识,并构建可审计的记忆工作流。

5.4 Operation Layer

5.4.1 MemOperator

In MemOS, efficient memory organization and accurate retrieval are fundamental to enabling intelligent behavior generation, contextual reasoning, and knowledge reuse. The MemOperator module fulfills this role by structuring memory content both logically and semantically. It incorporates tag-based annotation, graph-based linking, and hierarchical abstraction to support multi-perspective memory modeling. Simultaneously, it provides unified interfaces for hybrid retrieval, serving diverse agents across tasks, models, and user contexts.

在 MemOS 中,高效的记忆组织和准确检索是支持智能行为生成、上下文推理和知识复用的基础。 MemOperator 模块通过从逻辑和语义两方面组织记忆内容来承担这一职责。 它结合基于标签的标注、基于图的连接和分层抽象,以支持多视角记忆建模。 同时,它还提供混合检索的统一接口,为跨任务、模型和用户上下文的多种智能体服务。

Multi-perspective Memory Structuring. MemOS employs three complementary mechanisms for organizing memory. First, a flexible tagging system allows each memory unit to be annotated with metadata such as topic, source, credibility, and sentiment, supporting both user-defined and model-predicted labels. Second, a knowledge-graph structure treats memory as nodes connected via semantic edges, enabling traversable relations across memory items. Third, a semantic layering scheme segments memory into private, shared, and global layers, facilitating memory isolation and coordinated access across tasks and roles.

多视角记忆组织。 MemOS 使用三种互补机制组织记忆。 首先,灵活的标签系统允许使用主题、来源、可信度和情感等元数据标注每个记忆单元,同时支持用户定义和模型预测的标签。 其次,知识图谱结构把记忆视为通过语义边连接的节点,使记忆项之间的关系可以遍历。 第三,语义分层方案把记忆划分为私有层、共享层和全局层,支持跨任务和角色的记忆隔离与协同访问。

Hybrid Retrieval and Dynamic Dispatch. The MemOperator module supports hybrid retrieval mechanisms that combine symbolic and semantic strategies. Structured retrieval applies rule-based filtering over tags, time spans, Boolean conditions, and access control policies. Semantic retrieval uses embedding-based vector representations to identify contextually relevant memory units via similarity search. These two mechanisms can be composed into complex query expressions—such as tag filters combined with semantic ranking—to serve applications like multi-turn dialogue, question answering, or knowledge integration.

混合检索与动态分派。 MemOperator 模块支持结合符号策略和语义策略的混合检索机制。 结构化检索根据标签、时间跨度、布尔条件和访问控制策略应用规则筛选。 语义检索使用基于嵌入的向量表示,通过相似度搜索识别上下文相关的记忆单元。 这两种机制可以组合为复杂查询表达式,例如把标签筛选和语义排序结合起来,以服务多轮对话、问答或知识整合等应用。

Pipeline Coupling and Caching Strategy. Retrieved memory units are passed downstream as inputs to execution pipelines, tightly coupled with the Memory API and MemoryCube modules. To minimize latency, MemOS implements a local index caching strategy whereby frequently accessed memory is automatically migrated to high-speed intermediate storage. Cache invalidation is managed by heuristics based on usage frequency and contextual drift, with the MemScheduler module overseeing refresh operations in a dynamic, workload-aware manner.

流水线耦合与缓存策略。 检索到的记忆单元会作为执行流水线的输入传递给下游,并与 Memory APIMemoryCube 模块紧密耦合。 为尽量降低延迟,MemOS 实现本地索引缓存策略,把频繁访问的记忆自动迁移到高速中间存储。 缓存失效由基于使用频率和上下文漂移的启发式方法管理,MemScheduler 模块以动态、负载感知的方式监督刷新操作。

Task-Aligned Memory Routing. To address the complexity of real-world tasks, MemOS employs a task-aligned routing mechanism that resolves memory navigation paths based on hierarchical semantic goals. User inputs are decomposed into a topic–concept–fact structure, forming a three-layered task schema. The MemoryPathResolver component then formulates a retrieval strategy that answers three key questions: what to search, where to search, and in what order. This structured approach enhances interpretability, scheduling relevance, and alignment between memory selection and task intent.

任务对齐的记忆路由。 为应对现实任务的复杂性,MemOS 使用任务对齐的路由机制,根据分层语义目标解析记忆导航路径。 用户输入被分解为主题—概念—事实结构,形成三层任务模式。 随后,MemoryPathResolver 组件制定检索策略,回答三个关键问题:搜索什么、在哪里搜索,以及按什么顺序搜索。 这一结构化方法增强了可解释性、调度相关性,以及记忆选择与任务意图之间的对齐。

5.4.2 MemScheduler

MemScheduler is the central memory dispatcher of the MemOS operation layer. Its purpose goes beyond simply “retrieving” stored memories; it dynamically transforms and loads them into the runtime context based on task semantics, call frequency, and content stability. Relying on the three memory types defined in MemCube—Activation Memory (KV-Cache), Plaintext Memory, and Parameter Memory—MemScheduler supports classification, transformation, and hierarchical dispatch to deliver adaptive, high-performance memory operations.

MemScheduler 是 MemOS 操作层的中央记忆分派器。 它的作用不只是“检索”已存储的记忆,还会根据任务语义、调用频率和内容稳定性,把记忆动态转换并加载到运行时上下文中。 依托 MemCube 定义的三种记忆类型,即激活记忆(KV 缓存)、纯文本记忆和参数记忆,MemScheduler 支持分类、转换和分层分派,从而提供自适应、高性能的记忆操作。

Type-Aware Transformation and Loading Mechanism. During memory scheduling, MemScheduler analyzes task semantics, window size, and resource constraints to determine the best-fit memory type. Stable, frequently accessed content is transformed into Activation Memory for KV caching, minimizing prefill latency. Abstract rules and reusable patterns are encoded as Parameter Memory—e.g., via distillation or adapters embedded into model weights. Time-sensitive or session-specific knowledge is preserved as Plaintext Memory, inserted into the prompt as raw text. Adaptive triggers guide the loading process. For coherence-heavy tasks like multi-turn dialogue, the scheduler favors KV-cache recall. For procedural or expert-driven flows, parametric modules take precedence. For on-demand factual queries, plain memory is retrieved and contextualized. All decisions are logged to MemCube and coordinated with MemOperator's memory structure to maintain traceability and interpretability.

类型感知的转换与加载机制。 在记忆调度期间,MemScheduler 分析任务语义、窗口大小和资源约束,以确定最合适的记忆类型。 稳定且频繁访问的内容会转换为用于 KV 缓存的激活记忆,以尽量降低预填充延迟。 抽象规则和可复用模式会编码为参数记忆,例如通过蒸馏或嵌入模型权重的适配器实现。 时间敏感或会话专属的知识保留为纯文本记忆,以原始文本形式插入提示。 自适应触发器引导加载过程。 对于多轮对话等高度依赖连贯性的任务,调度器优先使用 KV 缓存回忆。 对于流程型或专家驱动的工作流,参数模块具有更高优先级。 对于按需事实查询,系统会检索纯文本记忆并将其置于上下文中。 所有决策都会记录到 MemCube,并与 MemOperator 的记忆结构协调,以保持可追踪性和可解释性。

Cross-Type Conversion and Migration. To maintain long-term performance and adaptive memory utilization, MemScheduler supports cross-type memory migration. For example, plain memories frequently recalled across sessions may be promoted to Activation Memory (KV cache). Stable templates used repeatedly can be distilled into parameter Memory. Conversely, underutilized KV entries may be downgraded to Plain Memory and archived to cold storage. This type-shifting mechanism ensures memory units evolve toward their optimal invocation form while conserving system resources.

跨类型转换与迁移。 为维持长期性能和自适应记忆利用,MemScheduler 支持跨类型记忆迁移。 例如,跨会话频繁回忆的纯文本记忆可以提升为激活记忆(KV 缓存)。 反复使用的稳定模板可以蒸馏为参数记忆。 相反,利用不足的 KV 条目可以降级为纯文本记忆,并归档到冷存储中。 这种类型转换机制使记忆单元在节约系统资源的同时,向最优调用形式演化。

Execution Path Integration and Governance. MemScheduler integrates upstream with MemReader and the Memory API to parse structured calls and semantic goals. Downstream, it collaborates with model execution paths to determine how and where to inject memory. Scheduling logic is optimized in real time, guided by task type, model load, cache hit rates, and access history. All dispatch actions are governed by MemGovernance, which enforces user-role boundaries, rate limits, and lifecycle policies. This ensures proper memory isolation and secure usage across users, models, and tasks, while maintaining an auditable record of every memory interaction.

执行路径集成与治理。 MemScheduler 在上游与 MemReaderMemory API 集成,用于解析结构化调用和语义目标。 在下游,它与模型执行路径协作,确定如何以及在何处注入记忆。 调度逻辑根据任务类型、模型负载、缓存命中率和访问历史进行实时优化。 所有分派操作都由 MemGovernance 治理,后者执行用户角色边界、速率限制和生命周期策略。 这确保记忆在用户、模型和任务之间得到适当隔离和安全使用,同时为每次记忆交互保留可审计记录。

5.4.3 MemLifecycle

In MemOS, each memory object is treated as a dynamic entity with evolving states, managed centrally by the MemLifecycle module. The system models memory as a finite state machine, cycling through four key states: Generated, Activated, Merged, and Archived. This framework supports semantic evolution, dynamic memory management, and stable, controlled resource scheduling at the storage layer.

在 MemOS 中,每个记忆对象都被视为状态持续演化的动态实体,并由 MemLifecycle 模块集中管理。 系统把记忆建模为有限状态机,在 Generated、Activated、Merged 和 Archived 四个关键状态之间循环。 这一框架支持存储层的语义演化、动态记忆管理以及稳定、可控的资源调度。

State Modeling and Evolution Logic. State transitions are triggered by a combination of system policies and user actions. For instance, in a smart meeting assistant, an auto-generated summary is initially labeled as “Generated”. If that summary is later referenced in a follow-up task—like agenda tracking or meeting comparison—it transitions into the “Activated” state. When the user adds supplementary data, or the system detects semantic overlap with historical memory, these entries are consolidated into a new version and marked as “Merged”. If a memory is no longer accessed for a prolonged period, it is demoted to the “Archived” state and moved to cold storage. Transitions can be explicitly initiated by user actions, or implicitly driven by system heuristics such as recency, contextual salience, or successful merge events.

状态建模与演化逻辑。 状态转换由系统策略和用户操作共同触发。 例如,在智能会议助手中,自动生成的摘要最初标记为 Generated。 如果该摘要后来在议程追踪或会议比较等后续任务中被引用,它会转为 Activated 状态。 当用户添加补充数据,或系统检测到其与历史记忆存在语义重叠时,这些条目会被合并为新版本并标记为 Merged。 如果一段记忆长期未被访问,它会降级为 Archived 状态并迁移到冷存储。 转换既可以由用户操作显式发起,也可以由最近性、上下文显著性或成功合并事件等系统启发式方法隐式驱动。

Time Machine and Freezing Mechanism. To ensure long-term consistency and recovery, MemOS offers a “Time Machine” capability that snapshots memory states and supports historical rollbacks. Users or developers can invoke this feature to restore an archived or merged memory back to a specific version, re-enabling its use in inference and context injection. This is critical for scenarios such as detecting model forgetting, handling user retractions, or conducting counterfactual simulations. In a policy collaboration platform, a user might unarchive an old clause to perform “what-if” simulations, without impacting the canonical frozen version and its audit trail. MemOS also supports a “Frozen” state for critical memories—like legal agreements or standard guidelines—where updates are disabled and full modification histories are retained for auditing, compliance, or education.

时间机器与冻结机制。 为确保长期一致性和可恢复性,MemOS 提供“时间机器”能力,对记忆状态制作快照并支持历史回滚。 用户或开发者可以调用这一功能,把已归档或已合并的记忆恢复到特定版本,使其重新用于推理和上下文注入。 这对于检测模型遗忘、处理用户撤回或进行反事实模拟等场景至关重要。 在政策协作平台中,用户可以取消归档旧条款来执行“假设”模拟,而不会影响规范的冻结版本及其审计轨迹。 MemOS 还支持关键记忆的 Frozen 状态,例如法律协议或标准指南;在这一状态下,系统禁止更新并保留完整修改历史,用于审计、合规或教育。

Scheduling and Storage Integration Strategy. Lifecycle states directly influence scheduling priority and storage allocation strategies. “Activated” memories are preferentially cached in local memory or fast-access MemoryCube instances for low-latency retrieval. “Archived” or “Frozen” memories are offloaded to MemVault, a cold storage layer optimized for durability over speed. Based on lifecycle rules, the system can batch-trigger operations like cleanup, compression, or migration to balance call availability with efficient resource usage.

调度与存储集成策略。 生命周期状态直接影响调度优先级和存储分配策略。 Activated 记忆会优先缓存到本地内存或快速访问的 MemoryCube 实例中,以实现低延迟检索。 Archived 或 Frozen 记忆会卸载到 MemVault,这一冷存储层优先保证持久性而非速度。 系统可以根据生命周期规则批量触发清理、压缩或迁移等操作,在调用可用性和高效资源利用之间取得平衡。

5.5 Infrastructure Layer

5.5.1 MemGovernance

MemGovernance is the core module in MemOS responsible for memory access control, compliance enforcement, and auditability. As memory systems evolve toward multi-user collaboration and long-horizon task reasoning, MemGovernance ensures that memory remains secure, interpretable, and controllable throughout its sharing, transfer, and inference processes. It establishes a ternary permission model involving the user identity, the memory object, and the calling context, supporting private, shared, and read-only access policies. Each memory request undergoes identity authentication and contextual validation to prevent unauthorized access. For example, in clinical settings, only physicians may access a patient’s diagnostic records; in enterprise systems, only authorized managers can retrieve archived policy documents.

MemGovernance 是 MemOS 中负责记忆访问控制、合规执行和可审计性的核心模块。 随着记忆系统向多用户协作和长程任务推理演进,MemGovernance 确保记忆在共享、迁移和推理过程中始终安全、可解释且可控。 它建立涉及用户身份、记忆对象和调用上下文的三元权限模型,支持私有、共享和只读访问策略。 每个记忆请求都要经过身份认证和上下文验证,以防止未经授权的访问。 例如,在临床场景中,只有医生可以访问患者诊断记录;在企业系统中,只有获授权的管理者可以检索归档政策文档。

It manages memory lifecycle policies such as time-to-live (TTL) enforcement and access-frequency-based garbage collection or archiving of inactive items. It also tracks memory usage heat to monitor high-traffic memory segments. Its privacy control subsystem includes sensitive content detection, automatic redaction, and access logging to ensure personal and behavioral data remain secure. All memory objects carry full provenance metadata, including creation source, invocation lineage, and mutation logs. Generated content can be watermarked semantically and tagged with behavioral fingerprints, allowing attribution and copyright tracking in multi-platform scenarios. The module also exposes audit interfaces for integration with enterprise compliance systems, supporting export of access logs and permission revision reports. These features support regulatory compliance in high-stakes environments such as healthcare and finance.

它管理生存时间(TTL)执行等记忆生命周期策略,并根据访问频率对不活跃条目进行垃圾回收或归档。 它还追踪记忆使用热度,以监控高流量记忆片段。 其隐私控制子系统包括敏感内容检测、自动脱敏和访问日志,确保个人数据和行为数据安全。 所有记忆对象都携带完整来源元数据,包括创建来源、调用谱系和变更日志。 生成内容可以添加语义水印和行为指纹标签,从而在多平台场景中支持归属和版权追踪。 该模块还公开审计接口,用于与企业合规系统集成,并支持导出访问日志和权限修订报告。 这些功能支持医疗和金融等高风险环境中的监管合规。

5.5.2 MemVault

MemVault is the central memory storage and routing infrastructure in MemOS, responsible for managing and serving diverse categories of memory. Memory is organized into namespaces such as user-private stores, expert knowledge bases, industry-shared repositories, contextual memory pools, and pipeline-aligned caches. Each is assigned a dedicated namespace and path structure to support efficient lookup and access control. To support heterogeneous backends, MemVault interfaces with vector stores, relational databases, and blob storage through a unified MemoryAdapter abstraction. This allows API-level consistency for querying, writing, and syncing memory regardless of backend heterogeneity. Stores may be configured as read-only caches or write-enabled repositories, depending on latency or learning objectives.

MemVault 是 MemOS 中央记忆存储和路由基础设施,负责管理并提供不同类别的记忆。 记忆被组织为用户私有存储、专家知识库、行业共享仓库、上下文记忆池和流水线对齐缓存等命名空间。 每类记忆都分配专属命名空间和路径结构,以支持高效查找和访问控制。 为了支持异构后端,MemVault 通过统一的 MemoryAdapter 抽象连接向量存储、关系数据库和对象存储。 这样,无论后端如何异构,查询、写入和同步记忆都能在 API 层保持一致。 根据延迟或学习目标,存储可以配置为只读缓存或允许写入的仓库。

At runtime, MemVault works in concert with MemScheduler and MemLifecycle to dynamically load memory based on access history, contextual relevance, and memory state. It supports tag-based, semantic, and full-text loading patterns, and triggers migration for hot memory to fast storage or cold data to archival zones. This architecture is vital for multi-model collaboration, domain-level knowledge fusion, and consistency in multi-turn dialogue—forming the knowledge backbone for scalable intelligent systems.

在运行时,MemVaultMemSchedulerMemLifecycle 协作,根据访问历史、上下文相关性和记忆状态动态加载记忆。 它支持基于标签、语义和全文的加载模式,并把热记忆迁移到快速存储,或把冷数据迁移到归档区域。 这一架构对于多模型协作、领域级知识融合和多轮对话一致性至关重要,并构成可扩展智能系统的知识骨干。

5.5.3 MemLoader & MemDumper

MemLoader and MemDumper form a bi-directional channel for memory migration across platforms in MemOS. They support injection, export, and synchronization of structured units like MemoryCube. This capability is essential for system handover, edge-cloud integration, and knowledge continuity across distributed agents. During ingestion, MemLoader accepts memory from local caches, third-party systems, or archives and maps it to target stores. It auto-fills provenance metadata, tagging, and lifecycle status to ensure governance readiness.

MemLoaderMemDumper 在 MemOS 中构成跨平台记忆迁移的双向通道。 它们支持注入、导出和同步 MemoryCube 等结构化单元。 这一能力对于系统交接、边缘—云集成和分布式智能体之间的知识连续性至关重要。 在导入期间,MemLoader 接收来自本地缓存、第三方系统或归档的记忆,并把它们映射到目标存储。 它会自动填充来源元数据、标签和生命周期状态,确保记忆已准备好接受治理。

MemDumper exports selected memory in portable formats with permission metadata, redacted fields, and access logs. Both components support periodic and event-driven updates, such as automatic export upon tag activation. The migration process is governed by MemGovernance to validate policies, trace operations, and isolate sensitive data. For instance, a mobile device may export patient interaction logs to the cloud, which remote agents later load to preserve task context.

MemDumper 以便携格式导出选定记忆,同时包含权限元数据、脱敏字段和访问日志。 两个组件都支持定期更新和事件驱动更新,例如在标签激活时自动导出。 迁移过程受 MemGovernance 治理,用于验证策略、追踪操作和隔离敏感数据。 例如,移动设备可以把患者交互日志导出到云端,随后由远程智能体加载,以保持任务上下文。

5.5.4 MemStore

MemStore is the open-access interface in MemOS that enables controlled publishing, subscription, and distribution of memory units. It supports memory exchange between models, institutions, and even industry-wide networks. Users may declare memory as publishable and define visibility, usage conditions, and access control rules. Each shared unit carries unique IDs and provenance metadata; MemGovernance ensures masking, watermarking, and policy validation during dissemination.

MemStore 是 MemOS 中支持受控发布、订阅和分发记忆单元的开放访问接口。 它支持模型、机构甚至全行业网络之间交换记忆。 用户可以声明一段记忆可发布,并定义可见性、使用条件和访问控制规则。 每个共享单元都携带唯一 ID 和来源元数据;MemGovernance 确保在传播期间执行遮蔽、水印和策略验证。

MemStore enables both push and pull models of memory exchange. Consumers can define subscriptions using tags or semantic filters, and the system delivers matched updates proactively. Licensed memory assets can enforce contract-bound access frequencies and expiry policies. All access is logged with invocation traces to support audit and accountability. For example, a hospital may publish de-identified diagnostic records for remote triage agents, with every call validated for context and provenance.

MemStore 同时支持推送和拉取两种记忆交换模式。 消费者可以使用标签或语义筛选器定义订阅,系统会主动交付匹配的更新。 获得许可的记忆资产可以执行合同约定的访问频率和过期策略。 所有访问都会连同调用轨迹一起记录,以支持审计和问责。 例如,医院可以为远程分诊智能体发布去标识化的诊断记录,并验证每次调用的上下文和来源。

6. Evaluation

To systematically evaluate the capabilities of MemOS, we conduct both holistic and component-level experiments. We begin by benchmarking the full system on the LoCoMo, LongMemEval, PreFEval and PersonaMem benchmark suite to assess its performance in memory-intensive reasoning and personalization tasks, comparing against several state-of-the-art baselines. In addition, we present targeted evaluations of key architectural subsystems, including multi-perspective memory organization, hybrid semantic retrieval, task-aligned scheduling, and KV-based activation memory injection. These experiments assess the individual effectiveness of each component and its contribution to overall system performance.

为了系统评估 MemOS 的能力,我们同时开展整体实验和组件级实验。 我们首先在 LoCoMo、LongMemEval、PreFEval 和 PersonaMem 基准套件上评测完整系统,与多种最先进基线比较其在记忆密集型推理和个性化任务中的性能。 此外,我们还针对多视角记忆组织、混合语义检索、任务对齐调度和基于 KV 的激活记忆注入等关键架构子系统进行专项评测。 这些实验评估每个组件自身的有效性及其对整体系统性能的贡献。

6.1 End-to-End Evaluation on Long Context Memory

To evaluate long-context and multi-session capabilities, we test MemOS on the LoCoMo and LongMemEval benchmarks against a diverse set of strong baselines, each representing a distinct memory design paradigm. Specifically, MIRIX manages memory via six specialized components (Core, Episodic, Semantic, Procedural, Resource, and Knowledge Vault); Mem0 implements slot-based long-term memory with top-k semantic search; Zep integrates time-aware knowledge graphs with structured query resolution; Memobase prioritizes the balance between performance, cost, and latency in long-term user memory; Supermemory employs a Dynamic Knowledge Graph to map relationships between memories, enabling semantic understanding as information evolves; and MemU processes multi-modal inputs by extracting and summarizing them into structured memory files. To ensure architectural parity, all methods are implemented over the same LLM backbone (GPT-4o-mini).

为评估长上下文和多会话能力,我们在 LoCoMo 和 LongMemEval 基准上测试 MemOS,并与代表不同记忆设计范式的多种强基线比较。 具体而言,MIRIX 通过六个专用组件管理记忆,即核心、情景、语义、程序、资源和知识仓库; Mem0 使用基于槽位的长期记忆和 top-k 语义搜索; Zep 把时间感知知识图谱与结构化查询解析结合起来; Memobase 强调长期用户记忆中性能、成本和延迟的平衡; Supermemory 使用动态知识图谱映射记忆之间的关系,从而随着信息演化进行语义理解; MemU 则抽取并总结多模态输入,将其处理为结构化记忆文件。 为保证架构层面的公平性,所有方法都基于同一个 LLM 骨干 GPT-4o-mini 实现。

All experiments are conducted on an 80GB H800 GPU under identical hardware and software configurations. To ensure a fair and optimized comparison, the configuration for each method is selected based on its best validation performance. Note that for MIRIX, token consumption data is omitted from the results due to system limitations.

所有实验都在一张 80GB H800 GPU 上,以相同硬件和软件配置运行。 为保证公平且经过优化的比较,每种方法的配置都根据其最佳验证性能选择。 需要注意的是,由于系统限制,结果中省略了 MIRIX 的 token 消耗数据。

表3:MemOS-1031 与多种基线在 LoCoMo 上的比较;所有方法使用相同的 GPT-4o-mini 基础 LLM。表中报告五类任务的 LLM 裁判分数、总体 F1 和上下文 token 数。
MethodTokensSingle-hop ↑Multi-hop ↑Temporal Reasoning ↑Open-domain ↑Overall ↑Overall F1 ↑
MIRIX-68.2254.2668.5446.8864.3328.10
Mem0117273.3358.7552.3445.8364.5743.46
Zep270166.2352.1254.8233.3359.2241.23
Memobase210273.1264.6581.2053.1272.0150.18
MemU61766.3463.1227.1050.0156.5535.15
Supermemory50067.3051.1231.7742.6755.3434.87
MemOS-1031158981.0967.4975.1855.9075.8045.27

As shown in Table 3, MemOS achieves the best average performance across nearly all task categories on the LoCoMo benchmark. Across all sub-tasks in LoCoMo, MemOS consistently ranks among the top performers, maintaining first or second place in every category. It demonstrates clear advantages in single-hop and multi-hop tasks, where long-range memory and contextual integration are especially critical. Beyond LLM-judge scores, MemOS also delivers strong generation quality in terms of F1 score while maintaining reasonable context length control, implying that its high LLM-judge scores are not a result of retrieval token overflow.

表3所示,MemOS 在 LoCoMo 基准几乎所有任务类别中都取得最佳平均性能。 在 LoCoMo 的所有子任务中,MemOS 始终位居前列,每个类别都保持第一或第二。 它在单跳和多跳任务中表现出明显优势,而这些任务尤其依赖长程记忆和上下文整合。 除 LLM 裁判分数外,MemOS 还在保持合理上下文长度控制的同时取得很强的 F1 生成质量,这说明其较高的 LLM 裁判分数并非来自检索 token 溢出。

表4:MemOS-1031 与多种基线在 LongMemEval 上的比较;所有方法使用相同的 GPT-4o-mini 基础 LLM。
MethodContent TokensSingle-session Preference ↑Single-session Assistant ↑Temporal Reasoning ↑Multi-session ↑Knowledge Update ↑Single-session User ↑Overall ↑
MIRIX-53.363.625.630.152.672.943.49
Zep1.6k53.375.054.147.474.492.963.8
Mem01.1k90.026.872.263.266.782.966.4
Memobase1.5k80.123.275.966.989.792.972.4
Supermemory0.4k89.958.944.452.655.185.758.4
MemU0.5k76.719.617.342.141.067.138.4
MemOS-10311.4k96.767.977.470.774.395.777.8

Similarly, for LongMemEval (Table 4), MemOS achieves the best average performance across almost all task categories. Across all sub-tasks in the benchmark, MemOS ranks among the top performers, placing first or second in every category except knowledge updates, and securing the best overall performance on average.

同样,在 LongMemEval(表4)上,MemOS 在几乎所有任务类别中都取得最佳平均性能。 在该基准的所有子任务中,MemOS 都位居前列;除知识更新外,它在每个类别中都排名第一或第二,并取得最佳总体平均性能。

6.2 End-to-End Evaluation on Personalization and Preference Understanding

To evaluate personalization and preference understanding, we test MemOS on the PreFEval and PersonaMem benchmarks against the same baselines detailed in Section 6.1. We use the identical hardware and software configurations as described in Section 6.1. For a fair and optimized comparison, the configuration for each method is selected based on its best validation performance.

为了评估个性化和偏好理解,我们在 PreFEval 和 PersonaMem 基准上测试 MemOS,并与第 6.1 节介绍的相同基线进行比较。 我们使用与第 6.1 节所述相同的硬件和软件配置。 为保证公平且经过优化的比较,每种方法的配置都根据其最佳验证性能选择。

表5:MemOS-1031 与多种基线在 PreFEval 上的比较;所有方法都基于 GPT-4o-mini。我们比较不注入无关对话与注入 10 轮无关对话两种场景。个性化响应越高越好,其余错误指标越低越好。
SettingMethodContext TokenPreference Unaware ↓Preference Hallucination ↓Inconsistency ↓Unhelpful Response ↓Personalized Response ↑
with 0 turnsBare LLM2027.580.99.10.40.09.6
Bare LLM (+rag-5)393.719.625.93.30.051.2
MIRIX-49.29.50.03.637.7
Mem083.014.018.41.40.365.9
Zep581.338.118.11.71.440.7
Memobase430.036.025.81.90.336.0
Supermemory117.018.519.92.60.658.4
MemU108.122.120.42.21.154.2
MemOS-1031557.04.614.51.62.177.2
with 10 turnsBare LLM11007.593.23.90.10.02.8
Bare LLM (+rag-5)392.526.627.13.90.043.2
MIRIX-77.972.00.07.07.9
Mem090.014.818.43.10.063.7
Zep901.241.015.72.11.339.9
Memobase563.037.025.82.00.134.1
Supermemory134.723.917.21.80.456.7
MemU113.926.520.31.10.251.8
MemOS-1031798.77.418.61.40.771.9

As shown in Table 5, MemOS not only achieved the best Personalized Response performance in both scenarios (with 0 turns and with 10 irrelevant turns) but also recorded the lowest preference unaware error. Importantly, it maintained acceptable context length control and low overall error rates. This demonstrates MemOS's stable recognition of user preferences and robustness in long-term memory, highlighting its unique value in understanding user intent and providing highly personalized experiences.

表5所示,MemOS 不仅在两种场景(0 轮和 10 轮无关对话)中都取得最佳个性化响应性能,还记录了最低的偏好未感知错误。 更重要的是,它保持了可接受的上下文长度控制和较低的总体错误率。 这说明 MemOS 能够稳定识别用户偏好,并在长期记忆中保持稳健,凸显其在理解用户意图和提供高度个性化体验方面的独特价值。

表6:MemOS-1031 与多种基线在 PersonaMem 上的比较;所有方法都基于 GPT-4o-mini。表中报告四选一任务的精确率和上下文 token 数。
MethodMIRIXMem0ZepMemobaseMemUSupermemoryMemOS-1031
Precision (1 in 4) ↑38.443.157.858.956.853.961.2
Context tokens-140165720924962041424

Similarly, for the PersonaMem benchmark (Table 6), MemOS achieved the best precision while maintaining acceptable context length control, further validating its superior capability in handling dynamic user profiles and preferences.

同样,在 PersonaMem 基准(表6)上,MemOS 在保持可接受上下文长度控制的同时取得最佳精确率,进一步验证了它处理动态用户画像和偏好的卓越能力。

6.3 Evaluation of Chunk Sizes and Top-K Selection

MemOS ablation

图9:MemOS 在不同记忆配置下的性能趋势。我们改变检索记忆块数量(Top-K,上方横轴)和块大小(下方横轴,即记忆 token 总量),并报告 LoCoMo 多项指标和任务类型上的性能。随着记忆容量增加,MemOS 始终保持一流水平,并在多跳和时间推理任务中取得明显提升;余弦相似度表明语义对齐始终稳定。

To better understand the impact of memory configuration, we conduct an ablation study by varying chunk sizes and Top-K retrieval depth. As shown in Figure 9, MemOS demonstrates stable and strong performance across all LoCoMo sub-tasks, with performance steadily improving as memory capacity increases—particularly for multi-hop and temporal reasoning tasks that demand long-range retrieval and contextual integration. In addition to higher LLM-Judge scores, generation metrics such as F1, ROUGE-L, and BLEU also benefit from memory expansion. Cosine similarity remains consistently high, indicating stable semantic alignment even with deeper retrieval. These results collectively validate the effectiveness of MemOS's architectural innovations—particularly its hybrid semantic retrieval and memory-centric design—which enable accurate, fluent, and contextually aligned responses under long-horizon constraints.

为了更好地理解记忆配置的影响,我们通过改变块大小和 Top-K 检索深度开展消融研究。 图9所示,MemOS 在所有 LoCoMo 子任务上都表现稳定且强劲,并随着记忆容量增加而稳步提升;这一趋势在需要长程检索和上下文整合的多跳及时间推理任务中尤其明显。 除更高的 LLM 裁判分数外,F1、ROUGE-L 和 BLEU 等生成指标也受益于记忆扩展。 余弦相似度始终保持较高水平,说明即使检索深度增加,语义对齐仍然稳定。 这些结果共同验证了 MemOS 架构创新的有效性,尤其是混合语义检索和以记忆为中心的设计;它们使系统在长程约束下生成准确、流畅且与上下文对齐的响应。

6.4 Evaluation of Memory Retrieval Robustness

表7:不同网络请求压力下,各 API 方法在 LoCoMo 上的延迟和成功率。报告添加和搜索操作的 P99、P90、平均延迟与成功率。
QPSAPIAddSearch
P99 (ms) ↓P90 (ms) ↓Mean (ms) ↓Success (%) ↑P99 (ms) ↓P90 (ms) ↓Mean (ms) ↓Success (%) ↑
10 qpsMem02841.01650.0888.0100.04637.01397.01089.0100.0
Memobase6169.11533.11126.299.914856.75974.72105.299.9
Supermemory3467.41816.91446.3100.02107.61457.41057.1100.0
MemU12070.67273.15077.964.263000.760539.547554.57.7
Zep375.1254.5239.099.75348.7614.8571.799.9
MemOS-1031376.4211.6191.9100.0777.1528.4440.5100.0
40 qpsMem02624.01258.0672.8941.71723.01309.0698.2251.2
Memobase7074.06251.52794.468.839985.318822.05515.597.8
Supermemory60639.150951.524996.689.42050.81117.2926.0100.0
MemU42129.935730.329033.07.561944.160565.241042.73.8
Zep269.9240.5227.726.65802.51480.2670.026.8
MemOS-1031282.1222192.6100.0951.6767.6613.8100.0
100 qpsMemOS-1031463.2311.1251.9100.01171.1872.5741.2100.0

We conduct a focused evaluation to analyze the efficiency and effectiveness of memory retrieval via network API. As shown in Table 7, we compare latency and success percentage for various API-based baselines under different Queries Per Second (QPS) request pressures. The baselines include Mem0, Memobase, Supermemory, MemU, and Zep, which are introduced in Section 6.1. The request contents are randomly sampled from the LoCoMo benchmark. To test robustness, the metrics reported include the P99, P90, and mean latency, as well as the success percentage rate for both memory insertion (add) and retrieval (search) operations.

我们开展专项评测,以分析通过网络 API 检索记忆的效率和效果。 表7所示,我们比较不同每秒查询数(QPS)请求压力下,多种基于 API 的基线延迟和成功率。 基线包括第 6.1 节介绍的 Mem0、Memobase、Supermemory、MemU 和 Zep。 请求内容从 LoCoMo 基准中随机采样。 为测试稳健性,报告指标包括 P99、P90 和平均延迟,以及记忆插入(添加)和检索(搜索)操作的成功率。

Our results show that MemOS exhibited the highest robustness with a 100% success percentage, maintaining the lowest latency across nearly all metrics regardless of the QPS pressure. Remarkably, MemOS achieved a 100% success rate and maintained reasonable latency even under 100 QPS. This demonstrates that MemOS's hybrid semantic organization and activation-based memory loading can achieve superior and highly stable performance across a wide range of QPS pressure.

结果表明,MemOS 以 100% 成功率展现最高稳健性,并且无论 QPS 压力如何,在几乎所有指标上都保持最低延迟。 值得注意的是,即使在 100 QPS 下,MemOS 仍实现 100% 成功率并保持合理延迟。 这说明 MemOS 的混合语义组织和基于激活的记忆加载,可以在广泛的 QPS 压力下取得优越且高度稳定的性能。

6.5 Evaluation of KV-Based Memory Acceleration

To evaluate the effectiveness of KV-form memory acceleration within MemOS, we design a controlled experiment simulating realistic memory reuse scenarios. During typical usage, the MemScheduler module in MemOS continuously monitors model interactions and automatically identifies the most frequently accessed and semantically stable plaintext memory entries. These entries are then converted into activation memory—a KV-format structure injected into the model's attention cache and proactively transferred to GPU memory for low-latency reuse. Our evaluation assumes this realistic deployment: memory has already been preprocessed and cached on GPU in KV format, avoiding the need for repeated prompt encoding.

为了评估 MemOS 中 KV 形式记忆加速的有效性,我们设计了模拟现实记忆复用场景的受控实验。 在典型使用过程中,MemOS 的 MemScheduler 模块持续监控模型交互,并自动识别访问最频繁且语义稳定的纯文本记忆条目。 随后,这些条目被转换为激活记忆,即注入模型注意力缓存并主动传输到 GPU 显存的 KV 格式结构,以便低延迟复用。 我们的评测采用这种现实部署假设:记忆已经完成预处理并以 KV 格式缓存在 GPU 上,因此无需重复编码提示。

We compare two memory usage strategies: prompt-based memory injection, where memory entries are prepended to the input sequence, and KV-cache injection, where memory is injected directly as key-value pairs into the model's attention mechanism. To simulate realistic inference conditions, we evaluate across three context lengths—short (583 tokens), medium (2773 tokens), and long (6064 tokens)—as well as three query types of increasing length and complexity: short (167 tokens), medium (302.7 tokens), and long (952.7 tokens). All experiments are conducted using the HuggingFace transformers library, running on a single NVIDIA H800 GPU with 80GB of memory under consistent system settings.

我们比较两种记忆使用策略:基于提示的记忆注入,把记忆条目前置到输入序列;以及 KV 缓存注入,把记忆作为键值对直接注入模型注意力机制。 为模拟现实推理条件,我们评测三种上下文长度:短(583 tokens)、中(2773 tokens)和长(6064 tokens);同时评测长度和复杂度递增的三类查询:短(167 tokens)、中(302.7 tokens)和长(952.7 tokens)。 所有实验都使用 HuggingFace transformers 库,在系统设置一致的一张 80GB NVIDIA H800 GPU 上运行。

We report four metrics as shown in Table 8. “Build” time refers to the preprocessing duration needed to convert memory into KV format. “KV TTFT” denotes the first-token latency under KV-based memory injection, while “Dir TTFT” indicates the latency under prompt-based injection. “Speedup” reflects the relative latency reduction achieved by KV injection compared to direct prompt injection.

我们报告表8所示的四项指标。 “Build”时间指把记忆转换为 KV 格式所需的预处理时长。 “KV TTFT”表示基于 KV 的记忆注入下首个 token 的延迟,而“Dir TTFT”表示基于提示注入的延迟。 “Speedup”反映与直接提示注入相比,KV 注入实现的相对延迟降低比例。

表8:使用 HuggingFace transformers 库,在不同模型、上下文长度和查询长度下评估首 token 时间(TTFT)及加速效果。比较直接提示注入和基于 KV 的注意力缓存注入;KV 记忆注入在不改变输出语义的情况下始终响应更快。
ModelCtxCtxTokQryQryTokBuild (s)KV TTFT (s)Dir TTFT (s)Speedup (%)
Qwen3-8Blong6064long952.70.920.502.3779.1
medium302.70.930.192.1691.1
short1670.930.122.0494.2
medium2773long952.70.410.431.2264.6
medium302.70.410.161.0885.1
short1670.430.100.9589.7
short583long952.70.120.390.5123.0
medium302.70.120.140.3255.6
short1670.120.080.2971.3
Qwen3-32Blong6064long952.70.710.311.0971.4
medium302.70.710.150.9884.3
short1670.710.110.9688.8
medium2773long952.70.310.240.5656.9
medium302.70.310.120.4775.1
short1670.310.080.4481.2
short583long952.70.090.200.2418.6
medium302.70.090.090.1539.6
short1670.090.070.1453.5
Qwen2.5-72Blong6064long952.71.260.482.0476.4
medium302.71.260.231.8287.2
short1671.270.151.7991.4
medium2773long952.70.580.391.0562.7
medium302.70.580.180.8979.2
short1670.710.230.8271.6
short583long952.70.160.330.4323.8
medium302.70.160.150.2743.2
short1670.160.100.2560.5

MemOS TTFT

图10:不同模型、上下文长度和查询长度下的首 token 时间(TTFT)比较。基于 KV 的记忆注入在输出相同的情况下始终实现更低延迟。

The results (Table 8 and Figure 10) confirm that KV-based memory injection yields substantial TTFT reduction across all models and configurations. The output sequences remain identical under both methods, validating their semantic equivalence. Acceleration is especially significant for larger models and longer contexts—for instance, Qwen2.5-72B achieves a 91.4% reduction in TTFT under long-context, short-query conditions. These findings highlight KV memory as a practical and effective technique for low-latency execution in memory-augmented language models.

结果(表8图10)证实,基于 KV 的记忆注入在所有模型和配置下都能显著降低 TTFT。 两种方法的输出序列保持完全一致,验证了它们在语义上的等价性。 对于更大模型和更长上下文,加速尤其明显;例如,在长上下文、短查询条件下,Qwen2.5-72B 的 TTFT 降低了 91.4%。 这些发现表明,KV 记忆是记忆增强语言模型实现低延迟执行的一项实用且有效的技术。

7. MemOS for Architecture Innovation and Applications

7.1 Architectural Innovations Enabled by MemOS

MemOS treats memory as a first-class system resource, enabling unified lifecycle management and orchestration of memory in multiple forms. This abstraction supports architectural innovations that focus on memory-driven modules and services, facilitating the modularization and reusability of knowledge assets.

MemOS 将记忆视为一等系统资源,从而支持对多种形式的记忆进行统一生命周期管理和编排。 这一抽象支持围绕记忆驱动模块和服务展开架构创新,促进知识资产的模块化和复用。

7.1.1 Paid Memory as Modular Installables (User-Facing Paradigm)

MemOS is designed around a memory-centric architecture, offering modularized and assetized memory interfaces that allow knowledge to be uploaded, mounted, and invoked like a digital resource. Under this paradigm, memory is no longer bound to training pipelines or development workflows but becomes a composable and user-controllable intelligence unit. Concretely, domain experts can publish structured experiential memories via MemStore, akin to publishing a knowledge plugin or an expert tip. Consumers—students, enterprise agents, or assistant models—can install these memories using a standardized loading interface, subject to permission control. This entire flow abstracts away the need for understanding the underlying model architecture or performing manual alignment. It drastically reduces the barrier to memory usage and makes memory-driven intelligence available beyond developers and platform operators.

MemOS 围绕以记忆为中心的架构设计,提供模块化、资产化的记忆接口,使知识能够像数字资源一样上传、挂载和调用。 在这一范式下,记忆不再绑定于训练流水线或开发工作流,而成为可组合且由用户控制的智能单元。 具体而言,领域专家可以通过 MemStore 发布结构化经验记忆,就像发布知识插件或专家建议一样。 学生、企业智能体或助手模型等消费者可以在权限控制下,使用标准化加载接口安装这些记忆。 整个流程抽象掉了理解底层模型架构或执行手工对齐的需要。 它显著降低记忆使用门槛,使开发者和平台运营者之外的人群也能使用记忆驱动的智能。

For instance, a medical student in clinical rotation may wish to study how to manage a rare autoimmune condition. An experienced physician can encapsulate diagnostic heuristics, questioning paths, and typical case patterns into a structured memory and upload it to MemStore. The student can then search, install, and invoke this memory locally via their assistant model. This bypasses the need for building formal ontologies or coordinating structured knowledge base design, as is common in traditional clinical AI.

例如,一名参加临床轮转的医学生可能希望学习如何处理一种罕见自身免疫疾病。 经验丰富的医生可以把诊断启发式、问诊路径和典型病例模式封装为结构化记忆,并上传到 MemStore 学生随后可以通过自己的助手模型,在本地搜索、安装并调用这段记忆。 这绕过了传统临床 AI 中常见的正式本体构建或结构化知识库设计协调工作。

MemOS encapsulates this process as a standardized “Memory-as-a-Service” capability, greatly expanding the accessibility and reusability of expert knowledge. Furthermore, MemGovernance, the dedicated control module in MemOS, offers full-spectrum privacy and access control for memory assets. It enables memory providers to define custom access conditions over their published content. For example, a medical expert may restrict installation rights to users who have completed a micropayment, enabling a form of licensed intelligence delivery.

MemOS 把这一过程封装为标准化“记忆即服务”能力,显著扩展专家知识的可访问性和可复用性。 此外,MemOS 的专用控制模块 MemGovernance 为记忆资产提供全方位隐私和访问控制。 它允许记忆提供者为已发布内容定义自定义访问条件。 例如,医疗专家可以把安装权限制给已完成小额支付的用户,从而实现一种获得许可的智能交付方式。

7.1.2 Painless Memory Management (Task-Oriented Paradigm)

MemOS abstracts memory as a universal, long-lived, and shareable infrastructure resource, architecturally analogous to storage subsystems in traditional operating systems. This design elevates memory from a model-embedded utility to a first-class system-level asset with its own lifecycle and invocation semantics. Unlike conventional transient memory techniques limited to context windows or parameter embeddings, MemOS offers standardized memory interfaces, a unified access protocol, and structured persistence formats. This enables runtime tasks to flexibly read, write, mount, fuse, or replace memory blocks on demand, without requiring manual state tracking or architectural alignment.

MemOS 把记忆抽象为通用、长寿命且可共享的基础设施资源,在架构上类似于传统操作系统的存储子系统。 这一设计把记忆从嵌入模型的工具提升为一等系统级资产,并赋予其自身的生命周期和调用语义。 传统瞬时记忆技术受限于上下文窗口或参数嵌入,而 MemOS 提供标准化记忆接口、统一访问协议和结构化持久化格式。 这使运行时任务可以按需灵活读取、写入、挂载、融合或替换记忆块,无需手工追踪状态或进行架构对齐。

Neither users nor developers need to handle low-level vector indexing, KV-caching, or context orchestration logic. Instead, they can access and update memory seamlessly through task-level Memory API calls. This infrastructure-level abstraction proves especially valuable in multi-stage, long-horizon, and evolving tasks.

用户和开发者都无需处理底层向量索引、KV 缓存或上下文编排逻辑。 相反,他们可以通过任务级 Memory API 调用无缝访问和更新记忆。 这种基础设施级抽象在多阶段、长程和持续演化的任务中尤其有价值。

For example, in an intelligent legal assistant system, a user may complete a corporate contract review task in distinct phases: the first phase may focus on structural layout and terminological consistency; the second phase may highlight risky clauses and compare precedent cases; and the final phase may involve checking compliance against current regulations. MemOS dynamically loads the appropriate memory sets at each stage (e.g., “Contract Template Memory”, “Risk Clause Case Logs”, “Recent Regulation Digest”), and performs hot-swapping and cache eviction as task contexts evolve. Throughout the task lifecycle, the user need not explicitly manage memory policies; the system automatically schedules the relevant memory assets based on context semantics, delivering a “memory-as-resource, use-on-demand” intelligent task execution experience.

例如,在智能法律助手系统中,用户可以分阶段完成企业合同审查任务: 第一阶段可能关注结构布局和术语一致性; 第二阶段可能标出风险条款并比较判例; 最后阶段可能检查合同是否符合现行法规。 MemOS 在每个阶段动态加载适当的记忆集合,例如“合同模板记忆”“风险条款案例日志”和“近期法规摘要”,并随着任务上下文演变进行热切换和缓存淘汰。 在整个任务生命周期中,用户无需显式管理记忆策略; 系统根据上下文语义自动调度相关记忆资产,提供“记忆作为资源、按需使用”的智能任务执行体验。

7.2 MemOS Application Scenarios

7.2.1 Supporting Multi-Turn Dialogue and Cross-Task Continuity

Real-world interactions rarely reveal user intent in a single turn; instead, goals are refined progressively over multiple exchanges. However, traditional LLMs rely on static context windows, making it difficult to retain key semantic states across turns, resulting in “memory loss” between dialogue rounds. For instance, in a procurement negotiation task, a user might set a budget cap of ¥300,000 in round 5, later revise product preferences in round 12 to prioritize domestic alternatives, yet by round 15, the model reverts to recommending high-priced imports based on earlier defaults.

现实交互很少在一轮中完整揭示用户意图,目标通常会经过多次交流逐步细化。 然而,传统 LLM 依赖静态上下文窗口,难以跨轮保留关键语义状态,导致不同对话轮次之间出现“记忆丢失”。 例如,在采购谈判任务中,用户可能在第 5 轮把预算上限设为 30 万元,在第 12 轮修改产品偏好,要求优先考虑国产替代品,但到第 15 轮时,模型却依据更早的默认设置重新推荐高价进口产品。

MemOS addresses this at the system level by extracting salient elements (e.g., budget, preferences, delivery constraints) after each user input and encoding them into structured “conversation memory units.” These are linked to the ongoing task’s long-term memory path via MemLink. During inference, MemScheduler retrieves relevant historical fragments based on current context and integrates them into the active reasoning path. This ensures continuity of semantic state and prevents logic drift due to “context sliding.” Furthermore, MemOS supports cross-task memory reuse to enable dialogue continuity and state persistence. For example, after completing an auto-form-filling task, the system retains memory of ID details or user habits. When the user later initiates a “visa application” task, MemOS recalls the previously stored data (e.g., from “passport issuance”), enabling seamless state transition across tasks.

MemOS 在系统层面解决这一问题:它在每次用户输入后抽取预算、偏好和交付约束等显著要素,并将其编码为结构化“对话记忆单元”。 这些单元通过 MemLink 连接到当前任务的长期记忆路径。 在推理期间,MemScheduler 根据当前上下文检索相关历史片段,并将其整合到活跃推理路径中。 这确保语义状态连续,并防止“上下文滑动”引起的逻辑漂移。 此外,MemOS 支持跨任务记忆复用,以实现对话连续性和状态持久化。 例如,完成自动填表任务后,系统会保留证件信息或用户习惯的记忆。 当用户后来发起“签证申请”任务时,MemOS 会回忆此前存储的数据,例如“护照签发”任务中的信息,从而实现任务之间的无缝状态转换。

7.2.2 Supporting Knowledge Evolution and Continuous Update

Modern knowledge is dynamic, yet LLMs are generally trained once with static datasets. Updating their internal knowledge either requires expensive fine-tuning or introduces risks like catastrophic forgetting. Even RAG approaches lack lifecycle, version, or governance mechanisms—leading to fragmented, unverifiable external knowledge. MemOS redefines knowledge as dynamic, lifecycle-governed memory. Each memory unit evolves independently, with defined stages for generation, replacement, fusion, and deprecation. The system schedules updates based on usage frequency, contextual alignment, and semantic overlap.

现代知识是动态的,但 LLM 通常只使用静态数据集训练一次。 更新其内部知识要么需要昂贵的微调,要么会引入灾难性遗忘等风险。 即使 RAG 方法也缺少生命周期、版本或治理机制,导致外部知识碎片化且无法验证。 MemOS 把知识重新定义为动态且受生命周期治理的记忆。 每个记忆单元独立演化,并具有生成、替换、融合和弃用等明确阶段。 系统根据使用频率、上下文对齐和语义重叠调度更新。

For example, when updated clinical guidelines are published, medical authorities can release them as explicit memory blocks via MemStore. MemOS tags them as “trusted sources,” compares them with older versions, and suggests updates to users. At inference time, MemScheduler prioritizes trusted and active versions, while obsolete entries are archived. This allows the model to remain up-to-date without retraining or harming prior knowledge structures. MemOS also supports personalized knowledge development. For instance, a cancer specialist may iteratively add interpretations and heuristics to drug usage. Over time, these refinements are integrated into their personal memory path, coexisting with official guidelines and selected based on task context.

例如,当更新后的临床指南发布时,医疗主管机构可以通过 MemStore 把它们作为显式记忆块发布。 MemOS 将其标记为“可信来源”,与旧版本比较,并向用户建议更新。 在推理时,MemScheduler 优先选择可信且活跃的版本,同时归档过时条目。 这使模型无需重新训练或破坏既有知识结构,也能保持最新状态。 MemOS 还支持个性化知识发展。 例如,肿瘤专家可以迭代添加对药物使用的解释和启发式经验。 随着时间推移,这些改进会整合进专家的个人记忆路径,与官方指南共存,并根据任务上下文进行选择。

7.2.3 Enabling Personalization and Multi-Role Modeling

LLMs today often operate statelessly across users and roles, unable to remember stylistic preferences or distinguish between user roles in complex settings. As a result, users must re-specify information every time, and models struggle to maintain consistent identity or behavior. MemOS provides system-level support for identity-aware memory and role-based behavior. Each user identity is associated with dedicated memory spaces, and multiple roles can coexist under one account.

当前 LLM 往往以无状态方式跨用户和角色运行,无法记住风格偏好,也无法在复杂场景中区分用户角色。 因此,用户每次都必须重新说明信息,而模型难以保持一致身份或行为。 MemOS 为身份感知记忆和基于角色的行为提供系统级支持。 每个用户身份都关联专属记忆空间,并且一个账户下可以同时存在多个角色。

For example, a user may interact as both a “parent” managing home tasks and a “manager” handling contracts. MemOS keeps memory streams separate and dynamically loads the appropriate persona during inference. In addition, long-term interaction patterns are encoded into “personal memory units” capturing language tone, response preferences, or value leanings. These units are incorporated into inference, yielding a personalized and coherent AI behavior. In enterprise contexts, MemOS allows deployment of predefined role templates with task scopes, permission controls, and memory sync strategies. For example, an organization may define roles for analysts, assistants, and project leads, each with distinct memory access and agent behavior.

例如,用户既可以作为管理家庭任务的“家长”交互,也可以作为处理合同的“经理”交互。 MemOS 将记忆流分开,并在推理期间动态加载适当角色画像。 此外,长期交互模式会被编码为“个人记忆单元”,捕捉语言语气、响应偏好或价值倾向。 这些单元会融入推理,产生个性化且连贯的 AI 行为。 在企业环境中,MemOS 允许部署带有任务范围、权限控制和记忆同步策略的预定义角色模板。 例如,组织可以定义分析师、助理和项目负责人等角色,每个角色都有不同的记忆访问权限和智能体行为。

7.2.4 Enabling Cross-Platform Memory Migration

In a world of multi-device, multi-agent environments, valuable user-model memories often become locked within individual platforms, creating “memory silos” that break continuity and fragment knowledge accumulation. MemOS resolves this through standardized memory representations, encryption, and platform-agnostic mount protocols. All memory blocks are portable across environments—from mobile to cloud to enterprise infrastructure. For example, a user’s “family travel preference” memory built via mobile assistant—including flight timing, hotel type, and budget—can be selectively migrated to a corporate travel planning agent on desktop, enabling consistent and efficient decision-making. By breaking the memory silo, MemOS transforms memory from a private asset embedded in a single model to a distributed, governable, and reusable intelligence layer across platforms.

在多设备、多智能体环境中,宝贵的用户—模型记忆常被锁在单个平台内,形成破坏连续性并割裂知识积累的“记忆孤岛”。 MemOS 通过标准化记忆表示、加密和平台无关的挂载协议解决这一问题。 所有记忆块都可以在移动端、云端和企业基础设施等环境之间迁移。 例如,通过移动助手建立的用户“家庭旅行偏好”记忆,包括航班时间、酒店类型和预算,可以选择性迁移到桌面端的企业差旅规划智能体,从而实现一致且高效的决策。 通过打破记忆孤岛,MemOS 把记忆从嵌入单个模型的私有资产,转变为跨平台分布式、可治理、可复用的智能层。

8. Conclusion

In this work, we introduce a memory operating system designed for Large Language Models, aimed at collaboratively building foundational memory infrastructure for next-generation LLM applications. MemOS provides a unified abstraction and integrated management framework for heterogeneous memory types, including parameter memory, activation memory, and explicit plaintext memory. We propose a standardized memory unit, MemCube, and implement key modules for scheduling, lifecycle management, structured storage, and transparent augmentation. These components collectively enhance reasoning coherence, adaptability, and system scalability in LLMs.

在这项工作中,我们提出面向大语言模型的记忆操作系统,旨在协同构建下一代 LLM 应用的基础记忆设施。 MemOS 为参数记忆、激活记忆和显式纯文本记忆等异构记忆类型提供统一抽象和集成管理框架。 我们提出标准化记忆单元 MemCube,并实现用于调度、生命周期管理、结构化存储和透明增强的关键模块。 这些组件共同增强 LLM 的推理连贯性、适应性和系统可扩展性。

Building on this foundation, we envision a future intelligent ecosystem centered on modular memory resources and supported by a decentralized memory marketplace. This paradigm shift enables the creation of next-generation AI systems capable of continual learning and long-term evolution. Looking ahead, we plan to explore the following directions:

在此基础上,我们设想未来的智能生态系统将以模块化记忆资源为中心,并由去中心化记忆市场支撑。 这一范式转变使构建能够持续学习和长期演化的下一代 AI 系统成为可能。 展望未来,我们计划探索以下方向:

  • Cross-LLM Memory Sharing: Enable interoperability and module reuse across different foundation models by sharing parametric and activation memories. To support consistent semantics and secure exchange, we plan to extend the Memory Interchange Protocol (MIP) to define standard formats, compatibility rules, and trust mechanisms for cross-model/app memory transmission—facilitating collaborative knowledge transfer among agents.
  • Self-Evolving MemBlocks: Develop memory units capable of self-optimization, reconstruction, and evolution based on usage feedback, reducing the need for manual maintenance and supervision.
  • Scalable Memory Marketplace: Establish decentralized mechanisms for memory exchange, supporting asset-level transactions, collaborative updates, and distributed evolution to foster a sustainable AI ecosystem.
  • 跨 LLM 记忆共享: 通过共享参数记忆和激活记忆,支持不同基础模型之间的互操作和模块复用。为支持一致语义和安全交换,我们计划扩展记忆交换协议(MIP),为跨模型或应用的记忆传输定义标准格式、兼容规则和信任机制,从而促进智能体之间的协同知识迁移。
  • 自演化 MemBlock: 开发能够根据使用反馈自我优化、重构和演化的记忆单元,减少手工维护和监督需求。
  • 可扩展记忆市场: 建立去中心化记忆交换机制,支持资产级交易、协作更新和分布式演化,以培育可持续的 AI 生态系统。

Overall, with the introduction of MemOS, we aim to transform LLMs from closed, static generation systems to continuously evolving intelligent agents equipped with long-term memory, integrated knowledge, and behavioral plasticity. MemOS not only addresses critical architectural limitations in current models but also lays the groundwork for cross-task, cross-platform, and multi-agent collaborative intelligence. Building on prior work demonstrating the potential of explicit memory and hierarchical memory representations in LLMs, we look forward to advancing the frontiers of MemOS in collaboration with the community, making memory a first-class computational resource in the age of general-purpose AI.

总体而言,通过引入 MemOS,我们希望把 LLM 从封闭、静态的生成系统转变为配备长期记忆、整合知识和行为可塑性的持续演化智能体。 MemOS 不仅解决当前模型的关键架构限制,还为跨任务、跨平台和多智能体协作智能奠定基础。 基于此前证明显式记忆和分层记忆表示在 LLM 中潜力的工作,我们期待与社区协作推进 MemOS 前沿,让记忆在通用 AI 时代成为一等计算资源。