TrawMem: Reframing Agent Memory as Task-Oriented Role-Adaptive Workspaces

Mingyu Zhang, Zixu Li, Zhiheng Fu, Zhiwei Chen, Jinhe Bi, Yupeng HuarXiv 2026 · arXiv

TL;DR

TrawMem is a novel memory framework for LLM agents that moves beyond simple "relevance-based" retrieval. By reframing memory as a Task-Oriented Role-Adaptive Workspace, it selects and organizes information based on its specific functional role—such as being a direct answer or a "bridge" to other vital facts—resulting in higher reasoning accuracy with significantly fewer context tokens.

What Problem Does This Paper Address?

As LLM agents tackle increasingly long and complex multi-turn dialogues, their "memory" becomes a bottleneck. Most current systems use a Retrieval-Augmented Generation (RAG) approach: they search for snippets of history that are semantically similar to the current user query and dump them into the prompt as context.

The authors argue that relevance is not utility. A memory might be highly relevant but not contain the answer itself; instead, it might serve as a "bridge" to another memory that has the missing piece of the puzzle. For example, if a user asks about a system error, one memory might mention a recent migration (the bridge), which then points the agent toward a second memory about a specific service that wasn't migrated (the answer). Standard systems often miss these "weakly relevant" but essential secondary memories.

Figure 1. Our observation and reframing of agent memory usage. (a) Memory Unit A directly supports Task A, while for Task B it serves as a bridge to memory unit B that may have weaker semantic relevance. (b) Existing memory systems typically retrieve relevant memories as context, whereas TrawMem constructs a task-oriented workspace by jointly selecting memory units and organizing their relations according to their roles.

Methods

TrawMem (Task-oriented Role-adaptive Workspace Memory) operates in two distinct stages:

  1. From Memory to Local Threads: The system organizes raw interaction history into "local threads"—groups of contiguous turns associated with the same event. It then builds a Thread Graph ($G_H$), connecting threads that are either adjacent in time or semantically similar.
  2. From Thread Neighborhoods to Workspaces: When a query arrives, TrawMem doesn't just search the whole database. It:
  3. Localizes: Identifies the most relevant "seed" threads and expands to their neighbors in the graph.
  4. Assigns Roles: It categorizes candidate memories into roles: Anchor (directly supports the answer), Bridge (connects to other useful info), or Context (provides necessary background).
  5. Assembles: Using a submodular objective function, it selects a subset of memories that maximizes "information coverage." This ensures the agent gets a complementary set of facts rather than a redundant list of similar-sounding snippets.
Figure 2. Overall architecture of TrawMem. Stage 1 organizes the interaction history into threads and constructs a thread graph. Stage 2 locates the thread neighborhood relevant to the current task, selects and organizes memory units according to the task requirements, and constructs a task-oriented workspace.

Datasets

The authors evaluated TrawMem on two major long-horizon dialogue benchmarks:

  • LoCoMo: Focuses on long-term dependencies (200–400 turns) with complex temporal dynamics and interleaved topics.
  • MemGallery: A multimodal benchmark covering nine different question categories, requiring diverse reasoning depths and semantic granularities.

Key Insights and Ideas

  • The "Bridge" Role: The most significant "aha" moment is the formalization of the "Bridge" role. By explicitly modeling how one memory leads to another, TrawMem can retrieve "hidden" information that standard embedding-based searches would ignore due to low semantic similarity scores.
  • Memory as a Structured Workspace: Instead of treating retrieved memories as a flat list (a sequence), TrawMem treats them as a subgraph. This preserves the original relations and context between turns, making it easier for the LLM to follow the "thread" of a conversation.
  • Complementarity over Redundancy: Standard retrieval often fills the context window with five versions of the same fact. TrawMem’s selection process specifically looks for the "marginal gain" of each new memory, ensuring the final workspace is dense with unique, useful information.

Key Results

TrawMem consistently outperformed representative memory systems (like Mem0, LightMem, and SimpleMem) across four different LLM backbones (Qwen3.5, DeepSeek-V4, etc.):

  • Accuracy Boost: On LoCoMo, it improved the "LLM-Judge" score by 4.07 to 4.31 percentage points over the previous state-of-the-art.
  • Efficiency: Despite the better performance, it required 12.8% fewer context tokens on Qwen3.5-9B and 5.1% fewer on DeepSeek-V4-Flash.
  • Temporal Reasoning: The gains were particularly pronounced in "Temporal" and "Multi-hop" questions, where the ability to link disparate events is crucial.

Limitations and Future Work

  • Retrieval Latency: The process of graph traversal and role assignment adds computational overhead during the retrieval stage. While the authors show total time is competitive, optimizing the "Role Demand Estimation" could further reduce latency.
  • Dependency on Dialogue Granularity: In one failure case, the system couldn't provide a specific year because the original dialogue only said "last August." TrawMem can organize existing info, but it cannot synthesize details that were never there.
  • Future Directions: The authors suggest exploring more granular role definitions and investigating how this "workspace" concept could scale to even larger, multi-agent social simulations.

Summary updated

Abstract

Large language model (LLM) agents rely on memory systems to leverage long-term interactions, yet existing systems typically retrieve memories based on their relevance to the current query and use them as contextual evidence. However, relevance alone does not characterize how a memory contributes to task solving: the same memory may serve different roles across tasks, such as directly supporting the answer or linking to complementary memories with weaker semantic relevance but necessary information. We therefore reframe agent memory systems as Task-Oriented Role-Adaptive Workspaces, where memories are selected and organized by their task-oriented roles and relations. Based on this view, we propose TrawMem, which organizes interaction histories into local threads and constructs task-oriented workspaces by assigning roles and jointly selecting complementary memories. Experiments on LoCoMo and MemGallery with four open- and closed-source backbones show consistent improvements over representative memory systems, with macro-F1 gains of 2.23-3.14 points. On LoCoMo, TrawMem improves the LLM-Judge score over SimpleMem by 4.07 and 4.31 percentage points on Qwen3.5-9B and DeepSeek-V4-Flash, respectively, while requiring approximately 12.8% and 5.1% fewer context tokens, respectively.
BibTeX
@misc{zhang2026trawmem,
  author = {Mingyu Zhang and Zixu Li and Zhiheng Fu and Zhiwei Chen and Jinhe Bi and Yupeng Hu},
  title = {{TrawMem: Reframing Agent Memory as Task-Oriented Role-Adaptive Workspaces}},
  year = {2026},
  eprint = {2610.36918},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.36918},
}
Figure