Filesystem-Based Memory for LLM Agents: Organization, Evolution, and Sustainability

Sizhe Zhou, Sheldon Yu, Hui Wei, Junda Wu, Siru Ouyang, Yizhu Jiao, Shijia Pan, Julian McAuley, Yu Zhang, Tong Yu, Jiawei HanarXiv 2026

TL;DR

This paper provides the first systematic study of filesystem-based memory for LLM agents—a "default" practice in industry (like Anthropic’s memory tool) that has been largely ignored by academic research. The authors find that while agent-led organization can halve retrieval costs for large datasets, it rarely improves answer quality on current benchmarks, and maintaining a healthy taxonomy becomes increasingly difficult for all but the strongest models as memory grows.

What Problem Does This Paper Address?

Large Language Model (LLM) agents need long-term memory to handle tasks spanning weeks or months, far exceeding any context window. While researchers often design complex, bespoke memory systems (like vector databases or knowledge graphs), industry has converged on a simpler approach: the filesystem. In this setup, an agent manages a directory tree of markdown files, reading and writing to them using standard file tools.

However, two major assumptions behind this approach remained untested:

  1. Can agents actually keep a growing filesystem organized as information accumulates, conflicts, and becomes stale?
  2. Does this organization actually pay off in terms of better performance or lower costs?

Methods

The authors formalize filesystem-based memory through a framework of three distinct roles interacting with a single store:

  • Management Agent: The "librarian" that integrates new information, resolves contradictions, and reorganizes the directory structure.
  • Search Agent: The "researcher" that traverses the filesystem to answer queries, providing citations back to specific files and lines.
  • Execution Agent: The "worker" that performs tasks (in procedural settings) and generates the experiences that need to be remembered.
Overview of the three-role framework and how the memory filesystem evolves over time.

The study evaluates several memory variants, ranging from a simple Verbatim Dump (zero curation) to an Agent-Curated Store (full organization). They also test different Tool Harnesses, comparing a set of specific file-manipulation functions against a raw Sandboxed Shell (bash).

Datasets

The researchers tested their framework across two distinct domains:

  1. Conversational Memory: Using LoCoMo, PersonaMem, and REALTALK. These benchmarks require agents to answer questions based on long, multi-session dialogues.
  2. Procedural Memory (Skills): Using ALFWorld, where an agent must learn and store reusable "skills" or procedures to succeed in embodied household tasks.

Key Insights and Ideas

  • Organization is for Economy, Not Accuracy: The primary benefit of a well-organized store is "search economy." For large datasets, organized stores roughly halve retrieval costs because the search agent can navigate a hierarchy rather than scanning massive verbatim logs. Surprisingly, organization did not significantly improve the correctness of answers on conversational benchmarks.
  • The "Condensation" Trap: Without explicit instructions to "keep every fact," management agents have a natural tendency to silently condense and lose detail when reorganizing files.
  • Shape is a Model Signature: The structure of the memory (how many folders, how deep the hierarchy) is driven more by the specific LLM used than by the scale of the data. For example, gpt-5.4-mini tends to consolidate everything into a few large files with deep internal headings, while gpt-5.4-nano sprawls into hundreds of small files.
  • The Harness is a Lever: Changing the tools available to the agent (e.g., giving it a bash shell vs. specific "memory tools") reshapes the store as drastically as swapping the underlying model. A shell-based agent is much more likely to shard data into many small files.
  • Capability Thresholds for Skills: In procedural tasks, there is a sharp threshold. Weak models fail to distill useful procedures regardless of the store's shape, while strong models can master distillation, making the store's content more important than the agent executing the task.

Key Results

  • Cost Savings: On the 128k-token PersonaMem tier, curated stores reduced search costs from 3.9 cents to 1.6 cents per query compared to verbatim dumps.
  • Sustainability: In long-running tasks (140 consecutive ALFWorld tasks), stores generally became more useful over time. However, taxonomy adherence (staying organized according to the rules) eroded for all models except the very strongest.
  • Skill Transfer: For the strongest management agent, a curated skill library allowed a weaker execution agent to outperform a stronger agent using only raw episode logs (88.6% success vs 73.6%).
Figure 1: Overview of filesystem-based agent memory. An execution agent does the work; what it experiences or chooses to save (conversation slices, task trajectories, or any other content) streams out as chunks into a management agent that integrates each chunk into one memory filesystem, serv- ing declarative memory and skills alike, and keeps it organized; when the agent needs to remember, it asks a search agent, which traverses the store and returns attributed answers, cited to the store, or retrieved skills. The management and search agents act on the store only through an interchangeable tool harness, and the store’s evolution over the stream is tracked. The execution agent is optional and need not invoke the management agent directly (its logged content can be handed over).

Limitations and Future Work

The authors note that current benchmarks might be "blind" to the benefits of organization because they don't yet reach the scale where a flat store becomes truly unmanageable.

Future research directions include:

  • Testing horizons much longer than a single conversation or 140 tasks.
  • Investigating how to induce "useful hierarchy" only where it provides a clear ROI.
  • Developing better benchmarks that specifically reward the structural health and sustainability of long-term memory.

Summary updated

BibTeX
@misc{zhou2026filesystem,
  author = {Sizhe Zhou and Sheldon Yu and Hui Wei and Junda Wu and Siru Ouyang and Yizhu Jiao and Shijia Pan and Julian McAuley and Yu Zhang and Tong Yu and Jiawei Han},
  title = {{Filesystem-Based Memory for LLM Agents: Organization, Evolution, and Sustainability}},
  year = {2026},
  eprint = {2607.26637},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.26637},
}
Figure