为大模型代理设计统一记忆操作语言,提升记忆管理的可靠性与跨平台兼容性。
Text2Mem: A Unified Memory Operation Language for Memory Operating System
- 用自然语言生成标准化记忆指令,通过JSON schema保证语法和语义一致
- 支持合并、升降级、锁定等高级操作,覆盖编码存储检索全流程
- 适配不同后端系统,适合需要可复现记忆行为的智能体研发者
大语言模型代理日益依赖记忆以维持长时交互,但现有框架功能受限。多数仅提供编码、检索、删除等基础操作,缺失合并、提升、降级、拆分、锁定、过期等高阶操作,且缺乏形式化可执行的命令规范,导致系统间行为不可预测。本文提出Text2Mem,一种统一的记忆操作语言,实现从自然语言到可靠执行的标准化路径。Text2Mem定义了紧凑而丰富的操作集,与编码、存储、检索对齐。每条指令以带必填字段和语义不变量的JSON模式实例表示,经解析器转化为参数归一化的类型化操作对象。验证器在执行前确保正确性,适配器将对象映射至SQL原型后端或真实记忆框架。必要时集成嵌入或摘要等模型服务。所有结果通过统一执行契约返回。该设计保障了安全性、确定性和异构后端间的可移植性。我们还规划了Text2Mem Bench,将模式生成与后端执行解耦,支持系统性评估。这些组件共同建立了智能体记忆控制的首个标准化基础。
原文摘要 · Abstract (English)
Large language model agents increasingly depend on memory to sustain long horizon interaction, but existing frameworks remain limited. Most expose only a few basic primitives such as encode, retrieve, and delete, while higher order operations like merge, promote, demote, split, lock, and expire are missing or inconsistently supported. Moreover, there is no formal and executable specification for memory commands, leaving scope and lifecycle rules implicit and causing unpredictable behavior across systems. We introduce Text2Mem, a unified memory operation language that provides a standardized pathway from natural language to reliable execution. Text2Mem defines a compact yet expressive operation set aligned with encoding, storage, and retrieval. Each instruction is represented as a JSON based schema instance with required fields and semantic invariants, which a parser transforms into typed operation objects with normalized parameters. A validator ensures correctness before execution, while adapters map typed objects either to a SQL prototype backend or to real memory frameworks. Model based services such as embeddings or summarization are integrated when required. All results are returned through a unified execution contract. This design ensures safety, determinism, and portability across heterogeneous backends. We also outline Text2Mem Bench, a planned benchmark that separates schema generation from backend execution to enable systematic evaluation. Together, these components establish the first standardized foundation for memory control in agents.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。