Can agents compress their own memory without losing critical details?
Explores whether agents can autonomously consolidate interaction history into structured memory schemas that reduce token overhead while preserving information needed for long-horizon reasoning and strategic reflection.
Long-horizon agent tasks face two compounding problems with raw context accumulation: token overhead grows linearly with steps, and the agent's attention gets diluted across irrelevant past details. Naive truncation loses information; naive summarization can drop critical specifics. DeepAgent introduces an alternative — autonomous memory folding — that lets the agent dynamically consolidate its history into a structured schema.
The brain-inspired structure separates three memory types. Episodic memory holds the narrative of past interactions — what happened, in what order, with what outcomes. Working memory holds the current active state for ongoing reasoning. Tool memory holds the catalog of tools the agent has discovered, used, or found relevant. Each is structured with an agent-usable data schema rather than as freeform text, ensuring stability and utility of the folded memory.
Beyond reducing token overhead, the folding step enables a second function the paper names directly: the agent can "take a breath" — pause mid-task to reconsider strategies and avoid erroneous paths. The cognitive analog is the way humans step back from a hard problem, re-summarize what they know, and then re-approach. The folding is not just a compression step; it is a structural opportunity for strategic reflection.
The autonomy of the folding is the key design choice. Rather than triggering folding on heuristic conditions (every N steps, every M tokens), DeepAgent lets the agent decide when to fold based on its own assessment of state. This treats memory management as a first-class agent action rather than as an external mechanism imposed by the framework.
The pattern connects to a broader observation about agent memory: continuously consolidated memory can degrade utility if the consolidation is poorly designed (the inverted-U finding from other work). DeepAgent's autonomy plus structured schema is one design that aims to keep the consolidation useful — the agent picks moments, and the schema preserves what the agent will need.
For long-horizon agent deployments, autonomous structured memory folding is now a viable alternative to either context truncation or external summarization pipelines.
Related concepts in this collection
-
Does agent memory degrade when continuously consolidated?
Can consolidating agent experiences into summaries actually harm long-term performance? Research on ARC-AGI tasks suggests continuous memory updates may reduce capability below the no-memory baseline.
adjacent (tension): when does consolidation help? DeepAgent's autonomous schema may avoid the inverted-U failure mode, but the conditions are not yet characterized
-
Can simulated APIs and token-level credit assignment train better tool-using agents?
Training agents to use real APIs is expensive and unstable, and sparse rewards make it hard to credit the right tool calls. Can combining LLM simulators with fine-grained advantage attribution solve both problems?
same paper, the RL training mechanism
-
Can agents discover tools dynamically instead of pre-selecting them?
Explore whether agents can find needed tools during execution rather than choosing from a fixed set upfront. This matters for long-horizon tasks where relevant tools cannot be known in advance.
same paper, the workflow consequence
-
Can three axes replace the short-term long-term memory split?
Does breaking agent memory into forms, functions, and dynamics provide a clearer framework than the traditional short-term/long-term distinction? This matters because current agent-memory literature lacks a unified vocabulary, making comparison between systems nearly impossible.
adjacent: complementary three-axis decomposition of agent memory
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
Original note title
autonomous memory folding compresses past agent interactions into structured episodic working and tool memory — enabling long-horizon reasoning by letting the agent take a breath