基于文件系统的LLM智能体记忆:组织管理、演化与可持续性
Filesystem-Based Memory for LLM Agents: Organization, Evolution, and Sustainability
July 29, 2026
作者: Sizhe Zhou, Sheldon Yu, Hui Wei, Junda Wu, Siru Ouyang, Yizhu Jiao, Shijia Pan, Julian McAuley, Yu Zhang, Tong Yu, Jiawei Han
cs.AI
摘要
已部署的大语言模型(LLM)智能体日益将其长期记忆以文件系统的形式存储:一个由Markdown文件构成的目录树,智能体通过通用文件工具自行读取、写入和重新组织。然而,研究在很大程度上忽视了这一介质:先前的系统设计定制了专门的记忆表征,并研究针对这些表征的检索,从而使得默认方案的两个工作假设未经检验——智能体能否在记忆不断积累、冲突和过期的过程中始终保持不断增长的记忆库有序组织,以及这种组织化能否带来回报。我们首次对基于文件系统的LLM智能体记忆进行了系统探索。我们将该场景形式化为围绕一个记忆文件系统的三个角色:管理智能体整合并组织传入的内容,搜索智能体以带引用的来源回答查询,执行智能体提供被提炼为技能的任务轨迹,从而在单一存储中统一了陈述性记忆与技能。在长对话基准和具身任务中,我们变化记忆形态(智能体组织的层级结构、逐字转储、分块检索)、数据流规模、工具框架(沙盒shell、记忆工具式函数、多种搜索工具)以及管理智能体和搜索智能体的能力,并在记忆增长过程中追踪答案质量、成本和存储健康状况。组织化所稳定带来的是搜索经济性:在材料规模较大时,有组织的存储使检索成本大致减半。然而,当今的智能体未能兑现默认方案的承诺:在我们的增长研究中,除最强的管理智能体之外,所有智能体的组织化程度都在退化,而且没有一个我们评测的智能体能够将组织化本身转化为更好的答案。此外,模型并非影响存储形态的唯一杠杆:仅更换工具集就能像更换模型一样显著地重塑存储形态。这项研究将文件系统默认方案从一种假设转变为智能体记忆的设计空间。
English
Deployed LLM agents increasingly keep their long-term memory as a filesystem: a directory tree of markdown files that the agent itself reads, writes, and reorganizes through generic file tools. Yet research has largely passed over this medium: prior systems design bespoke memory representations and study retrieval over them, leaving the default's two working assumptions untested: that an agent can keep a growing store organized as memories accumulate, conflict, and go stale, and that this organization pays. We present the first systematic exploration of filesystem-based memory for LLM agents. We formalize the setting as three roles around one memory filesystem: a management agent integrates and organizes incoming content, a search agent answers queries with cited sources, and an execution agent supplies task trajectories that are distilled into skills, unifying declarative memory and skills in a single store. Across long-conversation benchmarks and embodied tasks, we vary memory shape (agent-organized hierarchy, verbatim dump, chunk retrieval), stream scale, tool harness (sandboxed shell, memory-tool-style functions, varied search tooling), and the strengths of the management and search agents, tracking answer quality, cost, and store health as memory grows. What organization reliably buys is search economy: organized stores roughly halve retrieval cost where material is large. Today's agents, however, fall short of the default's promise: in our growth study, organization erodes for all but the strongest management agent, and no agent we measure converts organization itself into better answers. And the model is not the only lever over a store's shape: changing the tool set alone reshapes the store as strongly as swapping the model. The study turns the filesystem default from an assumption into a design space for agent memory.