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.
翻译:大型语言模型智能体日益依赖内存来维持长程交互,但现有框架仍存在局限。多数框架仅暴露编码、检索、删除等少数基础原语,而合并、升级、降级、拆分、锁定、过期等高级操作则缺失或支持不一致。此外,当前缺乏对内存指令的形式化可执行规范,导致作用域与生命周期规则隐式化,在不同系统中引发不可预测的行为。本文提出Text2Mem——一种统一的内存操作语言,为从自然语言到可靠执行提供了标准化路径。Text2Mem定义了一套与编码、存储及检索流程对齐的紧凑而富有表现力的操作集。每条指令均表示为基于JSON的模式实例,包含必需字段与语义不变式;解析器将其转换为参数规范化的类型化操作对象。验证器在执行前确保正确性,适配器则将类型化对象映射至SQL原型后端或实际内存框架。嵌入生成、摘要提取等基于模型的服务在需要时被集成。所有结果均通过统一的执行契约返回。该设计确保了跨异构后端的安全性、确定性与可移植性。本文还概述了Text2Mem Bench——一个将模式生成与后端执行分离以实现系统化评估的基准测试框架。这些组件共同为智能体中的内存控制建立了首个标准化基础。