Paper deep dive
HyMem: Hierarchical Context Management for Long-Horizon Agents via Information Isolation
XinQi Wang, Jinwei Xiao, Sijia Cui, Hongming Zhang, Yanna Wang, Qingyang Zhang, Bo Xu
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 93%
Last extracted: 8/22/2026, 2:51:36 AM
Summary
The paper introduces HyMem, a hierarchical context management framework for Large Language Model (LLM) agents designed to improve performance on long-horizon tasks. HyMem addresses the issue of context dilution by separating high-level planning from low-level execution and complex analysis into distinct functional layers. It utilizes an isolated reasoning module for subtasks and a memory management module for structured summaries, preventing redundant execution traces from cluttering the persistent planning context. Experiments on GAIA and Browsecomp-plus benchmarks demonstrate that HyMem, particularly with the DeepSeek-V4 backbone, significantly outperforms strong baselines like ReAct and ReSum in Pass@1 scores.
Entities (12)
Relation Signals (9)
HyMem ā evaluatedon ā BrowseComp-Plus
confidence 95% Ā· Experiments on GAIA and Browsecomp-plus show that... HyMem achieves average Pass@1 scores of 61.3%
HyMem ā evaluatedon ā GAIA
confidence 95% Ā· Experiments on GAIA and Browsecomp-plus show that... HyMem achieves average Pass@1 scores of 66.7%
Executor Layer ā partof ā HyMem
confidence 95% Ā· HyMem contains two context spaces: Planner, Executor... The executor performs a bounded tool-call loop
Planner Layer ā partof ā HyMem
confidence 95% Ā· HyMem contains two context spaces: Planner, Executor... The planner maintains the main decision context
HyMem ā uses ā Information Isolation
confidence 95% Ā· HyMem is a hierarchical framework that explicitly separates the agent's context... via Information Isolation.
HyMem ā usesbackbone ā DeepSeek-V4
confidence 95% Ā· with DeepSeek-V4, HyMem achieves average Pass@1 scores of 66.7% and 61.3%
HyMem ā outperforms ā ReSum
confidence 90% Ā· HyMem achieves average Pass@1 scores of 66.7%... outperforming the strongest baseline by 6.1... percentage points
HyMem ā outperforms ā ReACT
confidence 90% Ā· HyMem achieves average Pass@1 scores of 66.7%... outperforming the strongest baseline by 6.1... percentage points
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Large language model (LLM) agents often perform poorly on complex, long-horizon tasks because their context becomes increasingly cluttered over time. As interactions accumulate, detailed execution traces and intermediate outputs dominate the context, making it difficult for the model to retain and use high-level planning information. Most existing methods address this issue through compression or retrieval applied to a single, flat context, which does not clearly separate different types of context information and often leads to degraded reasoning. To address this challenge, we propose HyMem, a hierarchical framework that explicitly separates the agent's context into distinct functional layers. HyMem organizes context by function to separate high-level planning from execution and complex analysis. Its isolated reasoning module handles complex subtasks without adding intermediate reasoning traces to the persistent planning context, while its memory management module preserves task progress across context refreshes through structured summaries. These components reduce redundant context accumulation, retain task-critical information, and support coherent long-horizon reasoning within a limited context window. Experiments on GAIA and Browsecomp-plus show that, with DeepSeek-V4, HyMem achieves average Pass@1 scores of 66.7% and 61.3%, outperforming the strongest baseline by 6.1 and 4.7 percentage points, respectively. Further analysis indicates that HyMem effectively controls the growth of the reasoning context, allowing the model to maintain focus and accuracy across complex, long-horizon tasks.
Tags
Links
- Source: https://arxiv.org/abs/2608.15703v1
- Canonical: https://arxiv.org/abs/2608.15703v1
Trouble viewing inline? Open PDF directly ā
Full Text
63,739 characters extracted from source content.
Expand or collapse full text
HyMem: Hierarchical Context Management for Long-Horizon Agents via Information Isolation XinQi Wang Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Affiliation: University of Chinese Academy of Sciences Affiliation: Nanjing Artificial Intelligence Research of IA Affiliation: Equal Contribution wangxinqi2024@ia.ac.cn Jinwei Xiao Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Affiliation: University of Chinese Academy of Sciences Affiliation: Equal Contribution wangxinqi2024@ia.ac.cn Sijia Cui Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Affiliation: University of Chinese Academy of Sciences Hongming Zhang Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Yanna Wang Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Qingyang Zhang Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Bo Xu Affiliation: National Key Laboratory of Cognition and Decision Intelligence for Complex Systems,Institute of Automation, Chinese Academy of Sciences Affiliation: Nanjing Artificial Intelligence Research of IA Abstract Large language model (LLM) agents often perform poorly on complex, long-horizon tasks because their context becomes increasingly cluttered over time. As interactions accumulate, detailed execution traces and intermediate outputs dominate the context, making it difficult for the model to retain and use high-level planning information. Most existing methods address this issue through compression or retrieval applied to a single, flat context, which does not clearly separate different types of context information and often leads to degraded reasoning. To address this challenge, we propose HyMem, a hierarchical framework that explicitly separates the agentās context into distinct functional layers. HyMem organizes context by function to separate high-level planning from execution and complex analysis. Its isolated reasoning module handles complex subtasks without adding intermediate reasoning traces to the persistent planning context, while its memory management module preserves task progress across context refreshes through structured summaries. These components reduce redundant context accumulation, retain task-critical information, and support coherent long-horizon reasoning within a limited context window. Experiments on GAIA and Browsecomp-plus show that, with DeepSeek-V4, HyMem achieves average Pass@1 scores of 66.7% and 61.3%, outperforming the strongest baseline by 6.1 and 4.7 percentage points, respectively. Further analysis indicates that HyMem effectively controls the growth of the reasoning context, allowing the model to maintain focus and accuracy across complex, long-horizon tasks. 1 Introduction Figure 1: Changes in task-critical information within the agent context. As the context length increases, effective task signals are diluted by redundant historical information, reducing the agentās sensitivity to core constraint information. The left panel shows changes in task-critical information during task execution on GAIA by agents using ReAct and HyMem, respectively. The right panel illustrates the changes in the position and density of ReAct and HyMem within the context in a task example. Large Language Model-based agents have demonstrated remarkable capabilities in tackling intricate, long-horizon tasks across scenarios requiring extensive environmental interaction, such as graphical user interface manipulation (19; 23), in-depth research investigation (28; 6; 10; 17; 5), and web-based information retrieval (46; 12; 18; 3). However, when facing scenarios that mirror the complexity of real-world tasksānecessitating a seamless integration of macro-strategic planning and micro-tool manipulationāLLM-based agents still encounter significant challenges. A critical bottleneck emerges from the structural mismatch between the agentās cognitive processes and its context management. Long-horizon and complex tasks inherently involve different information streams: high-level strategic planning which requires stability and continuity, low-level execution traces which are often noisy and transient (45; 40; 35; 44; 42). In standard flat context architectures (e.g., ReAct (38)), these distinct streams are interleaved into a single sequence. As shown in Figure 1, the redundancy information from execution steps rapidly accumulates, creating an "information flood" that dilutes and eventually submerges the sparse but critical signals of the strategic plan. This leads the agent to lose track of its original goal amidst the details of tool usage. Prior approaches have attempted to mitigate context constraints through techniques such as context compression (33; 41; 36; 27; 47) or external memory retrieval (37; 8; 32; 11; 2; 43). However, these methods typically operate on a pre-mixed flat sequence, making it difficult to distinguish the underlying reasoning signal from the execution noise. Specifically, compression often leads to the loss of critical reasoning chains, and external memory retrieval frequently fails to preserve temporal logic and struggles to differentiate between high-level strategic planning and discrete execution steps. Ultimately, these strategies merely address the symptom of context length rather than the root cause: the way different types of information are mixed together in a single sequence. Figure 2: Overview of the HyMem framework. Upon query arrival, the PLanner Layer (a) performs task decomposition and iterative planning. Sub-tasks are routed to the Executor Layer (b) for execution within isolated reasoning spaces (c) based on complexity, returning refined results for strategic synthesis. Simultaneously, the framework maintains context efficiency by compressing historical trajectories into structured episode, working, and tool memories in (d), which are re-injected to ensure long-horizon task continuity and reasoning focus. To address the challenges, we propose HyMem, a framework that enforces hierarchical management and isolation between reasoning layer and execution layer. Instead of treating context as a passive log of past interactions, HyMem manages it deliberately to keep only what is useful for decision-making. By decoupling high-level strategic planning from low-level execution details, the framework encapsulates noisy interaction loops within a dedicated Action Layer, ensuring that the Planner Layer context remains clean and focused on high-value strategic signals. This source-level isolation fundamentally blocks the propagation of redundant execution information into the decision-making space, allowing for sustained reasoning clarity. Complementing this, HyMem uses a structured compression method to summarize past interactions into concise representations, reducing context size while preserving essential task information. As a training-free solution for the long-horizon reasoning task, HyMem offers seamless, plug-and-play convenience for complex, long-horizon tasks. To validate the effectiveness of the HyMem framework, we conducted systematic evaluations on two representative benchmark datasets, covering complex information retrieval tasks as well as general-purpose agent reasoning tasks. HyMem improves average Pass@1 over the strongest baseline by 6.1 percentage points on GAIA and 4.7 percentage points on Browsecomp-plus (30; 14; 47; 40). On hard Browsecomp-plus tasks, Pass@1 increases from 14.0% to 30.0%. Ablation studies show that isolated reasoning is important for long-horizon tasks: removing this module consistently lowers task success, indicating that complex subtask analysis should remain separate from the persistent planning context. Structured memory serves a complementary role by preserving task goals, completed milestones, and reusable tool experience across context refreshes. These findings suggest that effective long-horizon context management requires both selective information isolation and continuity preservation, rather than context compression alone. Furthermore, analysis of context length trajectories reveals that the HyMem architectureās global specification inference capability is less affected by redundant information during execution, demonstrating its potential for sustained reasoning and extensive exploration in complex, long-threaded tasks. In summary, our contributions are as follows: (1) We formalize context dilution in long-horizon agents as an information-density mismatch between sparse planning signals and dense execution traces, and introduce hierarchical context isolation as the guiding principle. (2) We instantiate this principle in HyMem, a training-free framework that separates planner, executor, isolated subtask reasoning, and structured memory management through explicit information boundaries. (3) We evaluate HyMem on Browsecomp-plus and GAIA against several methods. HyMem achieves average Pass@1 scores of 61.3% and 66.7%, outperforming the strongest baseline by 4.7 and 6.1 percentage points, respectively, while maintaining comparable token consumption and tool-call counts. 2 Related Work LLM-based Agent Frameworks. LLM-based agents have been widely studied as systems that combine language-model reasoning with tool use and environmental interaction (25; 24; 7). Representative frameworks such as ReAct (38), Plan-and-Solve (26), and Reflexion (21) improve task solving by making intermediate reasoning, action selection, planning, or self-reflection explicit. Recent agent systems further extend this paradigm to web search, GUI control, and long-horizon information-seeking tasks (35; 29; 9). Closely related to our work, THREAD (20) explores recursive child threads for deeper subtask reasoning. These methods demonstrate the value of structured reasoning workflows, but they mainly focus on how agents decompose, execute, or reflect on tasks. HyMem instead focuses on how information should be separated during execution: high-level planner, tool interaction, and deep subtask reasoning are placed in different context spaces, and only synthesized results are returned to the main decision context. Agent Memory and Context Management. Another line of work improves long-horizon agents through memory construction, retrieval, summarization, or learned context management (15). External memory systems such as A-MEM (32), Mem0 (2), and MemOS (13) organize reusable information outside the immediate context and retrieve relevant memories when needed. Intra-task context management methods such as ReSum (30), MemAgent (40), MEM1 (47), AgentFold (39), and context-folding approaches (22) compress or learn to retain useful trajectory information during long tasks. These approaches reduce context pressure, but they usually operate on trajectories where planning signals and execution traces have already been mixed, or require additional training to learn memory operations. HyMem is complementary to these methods: it uses structured memory to preserve task continuity, but its central mechanism is architectural context isolation, which reduces the amount of low-level execution noise that reaches the planner context in the first place. 3 Methodology As illustrated in Figure 2, HyMem is a training-free inference-time controller for long-horizon LLM agents. Its central design principle is typed context isolation: planning, tool execution, isolated sub-task reasoning, and memory consolidation are maintained in separate context spaces, and only schema-constrained messages are allowed to cross their boundaries. This design prevents raw execution traces and intermediate deliberation tokens from being directly appended to the main planning context, while preserving task continuity through structured memory. 3.1 Problem Formulation We consider an LLM-based agent that solves a user query q through iterative interaction with an environment ā°E. At step t, the agent emits an action or reasoning output ata_t and receives an observation otāo_t . A conventional ReAct-style agent maintains a flat context: Ct=(P,q,(a1,o1),ā¦,(at,ot)),C_t= (P,q,(a_1,o_1),ā¦,(a_t,o_t) ), (1) where P is the system prompt and all items are concatenated as tokens. The information in CtC_t is heterogeneous. We use two functional projections to describe this structure: Zt=ĻZā(Ct), Z_t= _Z(C_t), (2) Xt=ĻXā(Ct). X_t= _X(C_t). where ĻZā(ā ) _Z(Ā·) denotes a conceptual selector that extracts planning-relevant information from the context, ĻXā(ā ) _X(Ā·) denotes a selector for execution-level traces. ZtZ_t contains planning-relevant information such as goals, verified facts, constraints, and unresolved sub-goals, while XtX_t contains execution-level traces such as raw tool outputs, browsing logs, retries, formatting artifacts, and failed attempts. In long-horizon tasks, |Xt||X_t| typically grows faster than |Zt||Z_t|, reducing the relative density of planning-relevant information: Ļt=|Zt||Ct|. _t= |Z_t||C_t|. (3) We refer to this reduction ascontext dilution. Figure 1 empirically measures this phenomenon by tracking task-critical information across reasoning steps. HyMem aims to update the planner only through distilled typed messages. Let RtR_t denote the structured return from a lower-level context space. The intended information boundary is: Ct+1(p)=Uā”(Ct(p),Rt), C_t+1^(p)=U(C_t^(p),R_t), (4) Iā”(Ct+1(p);Xtā£Rt)ā0. I(C_t+1^(p);X_t R_t)ā 0. Uā”(ā )U(Ā·) is the planner-state update function, and Iā”(A;Bā£C)I(A;B C) denotes conditional mutual information. Eq. 4 is not optimized as a differentiable objective. It is enforced by the interface design: raw execution traces are kept inside lower-level contexts and only schema-constrained returns are appended to the planner. 3.2 HyMem Framework HyMem contains two context spaces: Planner, Executor, and two modules: isolated reasoning module, and Memory Management module. Only the planner persists across the whole task. Another spaces are instantiated on demand, return a typed message, and discard their private context. Planner. The planner maintains the main decision context: Ct(p)=(P(p),q,ā³tepi,ā³twm,ā³ttool,Ht(p)),C_t^(p)= (P^(p),q,M_t^epi,M_t^wm,M_t^tool,H_t^(p) ), (5) where ā³epiM^epi is episode memory, ā³wmM^wm is working memory, ā³toolM^tool is compact tool memory, and Ht(p)H_t^(p) stores only typed returns from previous sub-sessions. The planner emits exactly one action from: = =\ āØtaskā©ā(d),āØisoReasonā©ā(d), task (d), isoReason (d), (6) āØfoldā©,āØanswerā©(y^). fold , answer ( y)\. Executor. Given a tool-use directive d, HyMem creates a fresh executor context: Ct,0(e)=(P(e),d,ā³ttool).C_t,0^(e)=(P^(e),d,M_t^tool). (7) The executor performs a bounded tool-call loop and obtains raw observations ot,1,ā¦,ot,ko_t,1,ā¦,o_t,k. These observations are not returned directly. HyMem first applies a relevance-conditioned distillation operator: o~t,j=Ļā”(ot,jā£d), o_t,j=Ļ(o_t,j d), (8) where ĻĻ removes navigation text, duplicated passages, formatting artifacts, irrelevant snippets, and tool-error boilerplate while preserving named entities, dates, numerical values, source identifiers, evidence snippets, and answer candidates. The distilled observations are then synthesized into: Rt(e)= R_t^(e)= āØresultsā© results (9) [findings,evidence,sources, [findings,\ evidence,\ sources, OPENstatus,gaps] ,\ gaps] āØ/resultsā©. / results . Only Rt(e)R_t^(e) is appended to the planner history. The executor context and raw observations are discarded after return. Isolated reasoning. For sub-tasks requiring multi-hop analysis, hypothesis checking, or reconciliation of conflicting evidence, the planner emits āØisoReasonā©ā(d) isoReason (d). HyMem then creates: Ct,0(iso)=(CLOSE C_t,0^(iso)= ( P(iso),d,ā³tepi,ā³twm, P^(iso),\ d,\ M_t^epi,\ M_t^wm, (10) OPENā³ttool,Ļā”(Ht(p))). _t^tool,\ Ļ(H_t^(p)) ). where Ļā”(ā )Ļ(Ā·) selects the recent planner state needed to ground the sub-task. The isolated session may call the executor for additional evidence, but its intermediate reasoning trace remains private. It returns: Rt(iso)= R_t^(iso)= āØreturnā© return (11) [conclusion,supporting facts,sources, [conclusion,\ supporting facts,\ sources, OPENconfidence āĪŗ,assumptions] Īŗ,\ assumptions] āØ/returnā©. / return . where Īŗā[0,1]Īŗā[0,1] is the self-estimated confidence. After return, the isolated context is discarded. Structured memories. HyMem maintains three rewritable memories: ā³t=ā³tepi,ā³twm,ā³ttool.M_t=\M_t^epi,M_t^wm,M_t^tool\. (12) Episode memory records completed milestones, verified facts, and important decisions. Working memory records the current objective, unresolved gaps, and next-step plan. Tool memory records effective tool-use patterns, failed queries, and tool-specific caveats. The fold operator rewrites all memories jointly: ā³t+1=Φā”(Ht(p),Hā¤t(e),Hā¤t(iso),ā³t).M_t+1= (H_t^(p),H_⤠t^(e),H_⤠t^(iso),M_t). (13) HyMem uses asymmetric memory injection: C(p) C^(p) ā(ā³epi,ā³wm,ā³tool), ā(M^epi,M^wm,M^tool), (14) C(iso) C^(iso) ā(ā³epi,ā³wm,ā³tool), ā(M^epi,M^wm,M^tool), C(e) C^(e) āā³tool. ^tool. The tool memory injected into the planner is a compact procedural summary, not raw tool logs. This preserves reusable tool experience while keeping raw execution traces outside the planner. 3.3 Inference Procedure and Context Boundary HyMem wraps a frozen base LLM ĻĪø _Īø at inference time. At planner step t: atā¼ĻĪø(ā ā£Ct(p)),atā.a_t _Īø(Ā· C_t^(p)),\ a_t . (15) The transition is: at=āØtaskā©ā(d) a_t= task (d) āCt+1(p)āUā”(Ct(p),Rt(e)), C_t+1^(p)ā U\! (C_t^(p),R_t^(e) ), (16) at=āØisoReasonā©ā(d) a_t= isoReason (d) āCt+1(p)āUā”(Ct(p),Rt(iso)), C_t+1^(p)ā U\! (C_t^(p),R_t^(iso) ), at=āØfoldā©āorāTriggerā(st) a_t= fold \ or\ Trigger(s_t) āā³t+1āΦā”(ā ), _t+1ā (Ā·), at=āØanswerā©ā(y^) a_t= answer ( y) āreturnāy^. \ y. A fold is invoked when the planner explicitly emits āØfoldā© fold , or when one of the following deterministic conditions is met: Triggerā”(st)= (s_t)= [rtctx>0.99]āØ[ntexecā„5] [r_t^ctx>0.99] [n_t^execā„ 5] (17) āØ[ntfailā„3]āØ[ntturnā„8] [n_t^failā„ 3] [n_t^turnā„ 8] āØ[nttoolā„10]. [n_t^toolā„ 10]. Here, rtctxr_t^ctx is planner-context token utilization, ntexecn_t^exec counts executor invocations since the last fold, ntfailn_t^fail counts consecutive executor failures, ntturnn_t^turn counts planner turns since the last fold, and nttooln_t^tool counts tool calls since the last fold. The context boundary follows from the transition rules. Raw observations enter only the executor and are deleted after Rt(e)R_t^(e) is returned. Intermediate reasoning tokens enter only the isolated reasoning context and are deleted after Rt(iso)R_t^(iso) is returned. The planner grows through bounded typed returns and rewritten memories, rather than through the full length of tool traces or sub-task deliberations. Therefore, HyMem does not merely summarize a flat trajectory after it becomes long; it restricts which information can enter the decision context throughout execution. This mechanism underlies the lower context-dilution behavior measured in Figure 1. 4 Experiments Backbone Framework GAIA Browsecomp-plus Level 1 Level 2 Level 3 Avg. P@1 Easy Medium Hard Avg. P@1 No Agency Qwen3-32B Base 23.8 6.0 5.3 18.9 - - - - DeepSeek-V4 Base 35.7 27.2 15.8 28.3 14.0 10.0 0.0 8.0 Agentic Frameworks Qwen3-32B ReAct 19.0 10.6 0.0 11.8 70.0 24.0 2.0 32.0 Summary 30.9 21.2 5.3 22.0 20.6 46.0 14.0 2.0 DeepSeek-v4 ReAct 66.6 56.1 36.8 56.6 94.0 62.0 14.0 56.6 Summary 69.1 45.5 31.6 51.2 78.0 42.0 6.0 42.0 ReSum 76.2 54.5 47.4 60.6 78.0 46.0 6.0 43.3 AMEM 61.9 48.5 26.3 49.6 70.0 34.0 6.0 36.7 THREAD 42.9 34.8 26.3 35.4 42.0 30.0 8.0 26.7 Our Framework Qwen3-32B HyMem 45.2 30.3 15.8 33.0 48.0 24.0 4.0 25.3 DeepSeek-V4 HyMem 77.0 65.2 49.1 66.7 90.0 64.0 30.0 61.3 Table 1: Experimental results on GAIA and Browsecomp-plus benchmarks. P@1 denotes Pass@1. The bolded numbers represent the top performers in their respective categories. (1) HyMem improves the reasoning capabilities of different backbone models. (2) HyMem delivers the largest overall performance improvement among the compared agent frameworks. Benchmark. We evaluate HyMem using two benchmark datasets including GAIA (16), and Browsecomp-plus (1). Browsecomp-plus focuses on reasoning-intensive queries derived from OpenAIās Browsecomp (28) and provides a comprehensive offline corpus to ensure evaluation consistency without real-time web dependency. GAIA is employed to assess the agentās proficiency in general reasoning, retrieval, and tool utilization. Due to constraints in retrieval API resources and computational time, we randomly sampled 150 questions with a balanced difficulty distribution from Browsecomp-plus (22). For GAIA, the evaluation is restricted to text-based queries. Baseline and Implementation. HyMem is compared against several representative methodologies: the ReAct framework (38), which facilitates explicit reasoning via a continuous reason-act-observe cycle; Summarization-based workflows (40), which condense historical interaction trajectories into information-dense summaries to guide subsequent reasoning; ReSum (30), which periodically summarizes long interaction histories into compact reasoning states to support continued long-horizon exploration; A-MEM (31), which constructs an agentic memory system by organizing experiences into dynamically linked and evolving memory notes; and THREAD (20), which decomposes complex tasks through recursive thread spawning, enabling isolated subtask reasoning and subsequent aggregation. We evaluate two backbone models, Qwen3-32B (34) and DeepSeek-V4 (4). Unless otherwise specified, the same backbone is used for the compared framework under the same benchmark setting. Detailed prompts, turn budgets, and hyperparameters are provided in the Appendix A. (a) Token Consumption vs. Performance (b) Tool Calls vs. Performance Figure 3: Resource Consumption and Task Performance across Different Methods. We compare the resource consumption and task performance of ReAct, ReSum, A-MEM, THREAD, and HyMem on the GAIA and BrowseComp-Plus tasks. HyMem achieves better task performance while maintaining acceptable resource utilization. 4.1 Results and Analysis Table 1 shows that HyMem achieves the strongest overall performance when paired with the stronger DeepSeek-V4 backbone. On GAIA, DeepSeek-V4 with HyMem reaches an average Pass@1 of 66.7, improving over ReAct by 10.1 percentage points and over ReSum by 6.1 percentage points. The gain is consistent across all three GAIA difficulty levels, with the largest margin over ReAct appearing on Level 3 questions. On Browsecomp-plus, HyMem reaches an average Pass@1 of 61.3, outperforming ReAct by 4.7 percentage points and substantially exceeding memory-oriented or modular baselines such as ReSum, A-MEM, and THREAD. The difficulty-wise results further clarify where HyMem is most useful. On Browsecomp-plus with DeepSeek-V4, HyMem is slightly lower than ReAct on easy questions, but improves on medium and hard questions, especially hard questions where Pass@1 increases from 14.0 to 30.0. This pattern is consistent with the design motivation of HyMem: typed context isolation is most beneficial when solving the task requires sustained planning, evidence accumulation, and multi-step verification rather than short tool-use trajectories. The Qwen3-32B results show a more nuanced picture. On GAIA, HyMem improves the average Pass@1 from 11.8 under ReAct and 22.0 under the summarization workflow to 33.0, indicating that context isolation can help a smaller backbone sustain reasoning over multi-step tasks. However, on Browsecomp-plus, Qwen3-32B with HyMem does not outperform the ReAct baseline. This suggests that HyMemās gains depend not only on context structure but also on the underlying modelās ability to follow typed control instructions and produce reliable structured returns. We therefore treat cross-backbone robustness as promising but not uniform across all benchmark settings. Figure 4: Relationship between Context Changes and Task Progress across Different Methods. We record the relationship between context growth trends and task progress for ReAct, A-MEM, ReSum, and HyMem. HyMem-Total denotes the overall context of HyMem, while HyMem refers to the context of the planner module. 4.2 Efficiency and Context Behavior Figure 3 compares task performance against token consumption and tool-call count. HyMem occupies a favorable region of the performance-resource trade-off: it achieves higher task performance than ReAct, ReSum, A-MEM, and THREAD while keeping resource usage within a comparable range. This is important because HyMem introduces additional control structure, including isolated reasoning and memory folding. The analysis indicates that the performance gain is not simply obtained by unbounded context growth or excessive tool use; rather, structured context isolation directs additional computation toward task-relevant reasoning and evidence synthesis. Figure 4 shows that HyMemās advantage lies in how context is allocated rather than in reducing total context usage. HyMem-Total continues to grow as the Executor and Isolated Reasoning modules perform tool interaction and multi-step analysis, whereas the persistent Planner context grows much more slowly. The separation between the two curves indicates that most execution details and intermediate analysis remain within temporary contexts, while only structured returns and rewritten memories update the Planner. Compared with methods whose persistent reasoning contexts grow with accumulated interaction traces, HyMem supports extensive exploration while keeping the Planner context focused on task-relevant information and preventing transient execution details from accumulating throughout the task. Framework Browsecomp-plus (DeepSeek-V4) GAIA (Qwen3-32B) Pass@1 Plan. Conf. Pass@1 Plan. Conf. HyMem (Full) 0.6300 12.98 0.77 0.3200 14.20 0.82 w/o Isolated Reasoning 0.5800 (-5.00p) 10.26(-2.72) 0.68(-0.09) 0.1340 (-18.60p) 11.50(-2.70) 0.71(-0.11) w/o Memory Management 0.5400 (-9.00p) 9.68(-3.30) 0.69(-0.08) 0.1340 (-18.60p) 10.12(-4.08) 0.70(-0.12) Table 2: Ablation study of HyMem. Red values (-) indicate the performance drop compared to the full framework. 4.3 Ablation Study Table 2 evaluates the contribution of the two main components of HyMem: the Isolated Reasoning Module and Memory Management. Removing isolated reasoning causes the large performance drop, reducing Pass@1 by 5.0 percentage points on Browsecomp-plus and 18.6 percentage points on GAIA. This confirms that isolating deep sub-task reasoning is crucial for long-horizon agent tasks, especially when the main planner would otherwise accumulate long intermediate deliberations. Removing memory management also substantially degrades performance, reducing Pass@1 by 9.0 percentage points on Browsecomp-plus and 18.6 percentage points on GAIA. This result shows that typed isolation alone is insufficient: the agent also needs structured memories to preserve milestones, current goals, and reusable tool experience across context refreshes. Together, the ablation results support the two-part design of HyMem. Isolated reasoning protects the planner from sub-task deliberation noise, while memory management preserves task continuity after histories are folded. Finally, the auxiliary metrics in Table 2 help interpret the failure modes. Without isolated reasoning, Pass@1 decreases on both benchmarks, indicating that the agent is less effective at resolving complex subtasks when their analysis is handled directly within the persistent planning context. Without memory management, confidence also drops, indicating that losing structured task state makes the agent less certain even when it can still execute tools. These trends align with the proposed mechanism: HyMem improves long-horizon performance by coordinating where reasoning happens and how task state is retained. 5 Conclusion This paper addresses context dilution in long-horizon LLM agents, where sparse planning-relevant signals are gradually obscured by dense execution traces. We proposed HyMem, a training-free inference-time framework based on typed context isolation. By separating planning, tool execution, isolated sub-task reasoning, and memory consolidation into distinct context spaces, HyMem restricts raw observations and intermediate deliberation traces from directly entering the main planning context. Structured returns and asymmetric memory injection allow the agent to preserve task continuity while keeping the planner focused on verified facts, current goals, and unresolved gaps. Experiments on GAIA and Browsecomp-plus show that HyMem improves long-horizon agent performance most consistently with a stronger instruction-following backbone. With DeepSeek-V4, HyMem achieves the best average Pass@1 on both benchmarks and shows clear gains on harder Browsecomp-plus questions. The resource analysis further suggests that these gains are not simply obtained by using more tokens or more tool calls, while the context-growth analysis supports the intended mechanism: HyMem allows execution and isolated reasoning contexts to expand without proportionally expanding the persistent planner context. Ablation results confirm that both isolated reasoning and structured memory management are necessary for the full framework. HyMem also has clear boundaries. Its effectiveness depends on the modelās ability to follow typed control instructions and produce reliable structured returns, and the gains are not uniform across all backbone and benchmark combinations. Future work should study adaptive routing and memory-folding policies, reduce the cost of auxiliary distillation, and extend context isolation to interactive settings where user intent may change during multi-turn task execution. Limitations LLM-based agents are increasingly used for long-horizon tasks that require iterative planning, tool use, and information gathering. However, their performance is often limited by context dilution: as interaction histories grow, dense execution traces such as raw tool outputs, retries, and intermediate deliberations can obscure the sparse planning signals needed for global task control. Existing compression and retrieval methods reduce context length, but they usually operate after planning and execution information has already been mixed into a flat trajectory. We propose HyMem, a training-free inference-time framework based on typed context isolation. HyMem separates planning, tool execution, isolated sub-task reasoning, and memory consolidation into distinct context spaces, allowing only schema-constrained results and structured memories to enter the main planner context. Experiments on GAIA and Browsecomp-plus show that HyMem improves performance over ReAct, ReSum, and other agent baselines while maintaining an acceptable resource-performance trade-off. References Chen et al. (2025) Z. Chen, X. Ma, S. Zhuang, P. Nie, K. Zou, A. Liu, J. Green, K. Patel, R. Meng, M. Su, S. Sharifymoghaddam, Y. Li, H. Hong, X. Shi, X. Liu, N. Thakur, C. Zhang, L. Gao, W. Chen, and J. Lin BrowseComp-plus: a more fair and transparent evaluation benchmark of deep-research agent. arXiv preprint arXiv:2508.06600. Cited by: §4. Chhikara et al. (2025) P. Chhikara, D. Khant, S. Aryan, T. Singh, and D. Yadav Mem0: building production-ready ai agents with scalable long-term memory. External Links: 2504.19413, Link Cited by: §1, §2. Cui et al. (2025) S. Cui, A. He, S. Xu, H. Zhang, Y. Wang, Q. Zhang, Y. Wang, and B. Xu Self-guided function calling in large language models via stepwise experience recall. In Findings of the Association for Computational Linguistics: EMNLP 2025, C. Christodoulopoulos, T. Chakraborty, C. Rose, and V. Peng (Eds.), Suzhou, China, p. 10842ā10854. External Links: Link, Document, ISBN 979-8-89176-335-7 Cited by: §1. DeepSeek-AI et al. (2025) DeepSeek-AI, A. Liu, A. Mei, B. Lin, B. Xue, B. Wang, B. Xu, B. Wu, B. Zhang, C. Lin, C. Dong, C. Lu, C. Zhao, C. Deng, C. Xu, C. Ruan, D. Dai, D. Guo, D. Yang, D. Chen, E. Li, F. Zhou, F. Lin, F. Dai, G. Hao, G. Chen, G. Li, H. Zhang, H. Xu, H. Li, H. Liang, H. Wei, H. Zhang, H. Luo, H. Ji, H. Ding, H. Tang, H. Cao, H. Gao, H. Qu, H. Zeng, J. Huang, J. Li, J. Xu, J. Hu, J. Chen, J. Xiang, J. Yuan, J. Cheng, J. Zhu, J. Ran, J. Jiang, J. Qiu, J. Li, J. Song, K. Dong, K. Gao, K. Guan, K. Huang, K. Zhou, K. Huang, K. Yu, L. Wang, L. Zhang, L. Wang, L. Zhao, L. Yin, L. Guo, L. Luo, L. Ma, L. Wang, L. Zhang, M. S. Di, M. Y. Xu, M. Zhang, M. Zhang, M. Tang, M. Zhou, P. Huang, P. Cong, P. Wang, Q. Wang, Q. Zhu, Q. Li, Q. Chen, Q. Du, R. Xu, R. Ge, R. Zhang, R. Pan, R. Wang, R. Yin, R. Xu, R. Shen, R. Zhang, S. H. Liu, S. Lu, S. Zhou, S. Chen, S. Cai, S. Chen, S. Hu, S. Liu, S. Hu, S. Ma, S. Wang, S. Yu, S. Zhou, S. Pan, S. Zhou, T. Ni, T. Yun, T. Pei, T. Ye, T. Yue, W. Zeng, W. Liu, W. Liang, W. Pang, W. Luo, W. Gao, W. Zhang, X. Gao, X. Wang, X. Bi, X. Liu, X. Wang, X. Chen, X. Zhang, X. Nie, X. Cheng, X. Liu, X. Xie, X. Liu, X. Yu, X. Li, X. Yang, X. Li, X. Chen, X. Su, X. Pan, X. Lin, X. Fu, Y. Q. Wang, Y. Zhang, Y. Xu, Y. Ma, Y. Li, Y. Li, Y. Zhao, Y. Sun, Y. Wang, Y. Qian, Y. Yu, Y. Zhang, Y. Ding, Y. Shi, Y. Xiong, Y. He, Y. Zhou, Y. Zhong, Y. Piao, Y. Wang, Y. Chen, Y. Tan, Y. Wei, Y. Ma, Y. Liu, Y. Yang, Y. Guo, Y. Wu, Y. Wu, Y. Cheng, Y. Ou, Y. Xu, Y. Wang, Y. Gong, Y. Wu, Y. Zou, Y. Li, Y. Xiong, Y. Luo, Y. You, Y. Liu, Y. Zhou, Z. F. Wu, Z. Z. Ren, Z. Zhao, Z. Ren, Z. Sha, Z. Fu, Z. Xu, Z. Xie, Z. Zhang, Z. Hao, Z. Gou, Z. Ma, Z. Yan, Z. Shao, Z. Huang, Z. Wu, Z. Li, Z. Zhang, Z. Xu, Z. Wang, Z. Gu, Z. Zhu, Z. Li, Z. Zhang, Z. Xie, Z. Gao, Z. Pan, Z. Yao, B. Feng, H. Li, J. L. Cai, J. Ni, L. Xu, M. Li, N. Tian, R. J. Chen, R. L. Jin, S. S. Li, S. Zhou, T. Sun, X. Q. Li, X. Jin, X. Shen, X. Chen, X. Song, X. Zhou, Y. X. Zhu, Y. Huang, Y. Li, Y. Zheng, Y. Zhu, Y. Ma, Z. Huang, Z. Xu, Z. Zhang, D. Ji, J. Liang, J. Guo, J. Chen, L. Xia, M. Wang, M. Li, P. Zhang, R. Chen, S. Sun, S. Wu, S. Ye, T. Wang, W. L. Xiao, W. An, X. Wang, X. Sun, X. Wang, Y. Tang, Y. Zha, Z. Zhang, Z. Ju, Z. Zhang, and Z. Qu DeepSeek-v3.2: pushing the frontier of open large language models. External Links: 2512.02556, Link Cited by: §4. Google (2025) Google Deep research is now available on gemini 2.5 pro experimental. Technical Report Google. External Links: Link Cited by: §1. Jin et al. (2025) B. Jin, H. Zeng, Z. Yue, J. Yoon, S. Arik, D. Wang, H. Zamani, and J. Han Search-r1: training llms to reason and leverage search engines with reinforcement learning. External Links: 2503.09516, Link Cited by: §1. Jin et al. (2022) J. Jin, H. Zhang, and J. Luo Build generally reusable agent-environment interaction models. External Links: 2211.08234, Link Cited by: §2. Leng et al. (2024) Q. Leng, J. Portes, S. Havens, M. Zaharia, and M. Carbin Long context rag performance of large language models. External Links: 2411.03538, Link Cited by: §1. Li et al. (2025a) K. Li, Z. Zhang, H. Yin, R. Ye, Y. Zhao, L. Zhang, L. Ou, D. Zhang, X. Wu, J. Wu, X. Wang, Z. Qiao, Z. Zhang, Y. Jiang, P. Xie, F. Huang, and J. Zhou WebSailor-v2: bridging the chasm to proprietary agents via synthetic data and scalable reinforcement learning. External Links: 2509.13305, Link Cited by: §2. Li et al. (2025b) X. Li, G. Dong, J. Jin, Y. Zhang, Y. Zhou, Y. Zhu, P. Zhang, and Z. Dou Search-o1: agentic search-enhanced large reasoning models. CoRR abs/2501.05366. External Links: Link, Document, 2501.05366 Cited by: §1. Li et al. (2025c) X. Li, W. Jiao, J. Jin, G. Dong, J. Jin, Y. Wang, H. Wang, Y. Zhu, J. Wen, Y. Lu, and Z. Dou DeepAgent: a general reasoning agent with scalable toolsets. External Links: 2510.21618, Link Cited by: §1. Li et al. (2025d) X. Li, J. Jin, G. Dong, H. Qian, Y. Zhu, Y. Wu, J. Wen, and Z. Dou WebThinker: empowering large reasoning models with deep research capability. CoRR abs/2504.21776. External Links: Link, Document, 2504.21776 Cited by: §1. Li et al. (2025e) Z. Li, S. Song, H. Wang, S. Niu, D. Chen, J. Yang, C. Xi, H. Lai, J. Zhao, Y. Wang, J. Ren, Z. Lin, J. Huo, T. Chen, K. Chen, K. Li, Z. Yin, Q. Yu, B. Tang, H. Yang, Z. J. Xu, and F. Xiong MemOS: an operating system for memory-augmented generation (mag) in large language models. External Links: 2505.22101, Link Cited by: Appendix C, §2. Lu et al. (2025) M. Lu, W. Sun, W. Du, Z. Ling, X. Yao, K. Liu, and J. Chen Scaling llm multi-turn rl with end-to-end summarization-based context management. External Links: 2510.06727, Link Cited by: §1. Mei et al. (2025) L. Mei, J. Yao, Y. Ge, Y. Wang, B. Bi, Y. Cai, J. Liu, M. Li, Z. Li, D. Zhang, C. Zhou, J. Mao, T. Xia, J. Guo, and S. Liu A survey of context engineering for large language models. External Links: 2507.13334, Link Cited by: §2. Mialon et al. (2024) G. Mialon, C. Fourrier, T. Wolf, Y. LeCun, and T. Scialom GAIA: a benchmark for general AI assistants. In The Twelfth International Conference on Learning Representations, External Links: Link Cited by: §4. OpenAI (2025) OpenAI Deep research system card. Technical Report OpenAI. External Links: Link Cited by: §1. Qiao et al. (2025) Z. Qiao, G. Chen, X. Chen, D. Yu, W. Yin, X. Wang, Z. Zhang, B. Li, H. Yin, K. Li, R. Min, M. Liao, Y. Jiang, P. Xie, F. Huang, and J. Zhou WebResearcher: unleashing unbounded reasoning capability in long-horizon agents. External Links: 2509.13309, Link Cited by: §1. Qin et al. (2025) Y. Qin, Y. Ye, J. Fang, H. Wang, S. Liang, S. Tian, J. Zhang, J. Li, Y. Li, S. Huang, et al. UI-tars: pioneering automated gui interaction with native agents. arXiv preprint arXiv:2501.12326. External Links: Document Cited by: §1. Schroeder et al. (2025) P. Schroeder, N. W. Morgan, H. Luo, and J. R. Glass THREAD: thinking deeper with recursive spawning. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), L. Chiruzzo, A. Ritter, and L. Wang (Eds.), Albuquerque, New Mexico, p. 8418ā8442. External Links: Link, Document, ISBN 979-8-89176-189-6 Cited by: §2, §4. Shinn et al. (2023) N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao Reflexion: language agents with verbal reinforcement learning. In Advances in Neural Information Processing Systems, A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (Eds.), Vol. 36, p. 8634ā8652. External Links: Link Cited by: §2. Sun et al. (2025) W. Sun, M. Lu, Z. Ling, K. Liu, X. Yao, Y. Yang, and J. Chen Scaling long-horizon llm agent via context-folding. External Links: 2510.11967, Link Cited by: Appendix C, §2, §4. Tang et al. (2025) X. Tang, T. Qin, T. Peng, Z. Zhou, D. Shao, T. Du, X. Wei, P. Xia, F. Wu, H. Zhu, G. Zhang, J. Liu, X. Wang, S. Hong, C. Wu, H. Cheng, C. Wang, and W. Zhou Agent kb: leveraging cross-domain experience for agentic problem solving. External Links: 2507.06229, Link Cited by: §1. Team (2025) G. Team Gemini 2.5: pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. External Links: 2507.06261, Link Cited by: §2. Wang et al. (2023a) L. Wang, C. Ma, X. Feng, Z. Zhang, H. Yang, J. Zhang, Z. Chen, J. Tang, X. Chen, Y. Lin, W. X. Zhao, Z. Wei, and J. Wen A survey on large language model based autonomous agents. External Links: 2308.11432 Cited by: §2. Wang et al. (2023b) L. Wang, W. Xu, Y. Lan, Z. Hu, Y. Lan, R. K. Lee, and E. Lim Plan-and-solve prompting: improving zero-shot chain-of-thought reasoning by large language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), A. Rogers, J. Boyd-Graber, and N. Okazaki (Eds.), Toronto, Canada, p. 2609ā2634. External Links: Link, Document Cited by: §2. Wang et al. (2025) Y. Wang, R. Takanobu, Z. Liang, Y. Mao, Y. Hu, J. McAuley, and X. Wu Mem-α: learning memory construction via reinforcement learning. External Links: 2509.25911, Link Cited by: §1. Wei et al. (2025) J. Wei, Z. Sun, S. Papay, S. McKinney, J. Han, I. Fulford, H. W. Chung, A. T. Passos, W. Fedus, and A. Glaese BrowseComp: a simple yet challenging benchmark for browsing agents. External Links: 2504.12516, Link Cited by: §1, §4. Wu et al. (2025a) J. Wu, B. Li, R. Fang, W. Yin, L. Zhang, Z. Tao, D. Zhang, Z. Xi, G. Fu, Y. Jiang, P. Xie, F. Huang, and J. Zhou WebDancer: towards autonomous information seeking agency. External Links: 2505.22648, Link Cited by: §2. Wu et al. (2025b) X. Wu, K. Li, Y. Zhao, L. Zhang, L. Ou, H. Yin, Z. Zhang, X. Yu, D. Zhang, Y. Jiang, P. Xie, F. Huang, M. Cheng, S. Wang, H. Cheng, and J. Zhou ReSum: unlocking long-horizon search intelligence via context summarization. External Links: 2509.13313, Link Cited by: §1, §2, §4. Xu et al. (2025a) W. Xu, Z. Liang, K. Mei, H. Gao, J. Tan, and Y. Zhang A-mem: agentic memory for llm agents. External Links: 2502.12110, Link Cited by: §4. Xu et al. (2025b) W. Xu, Z. Liang, K. Mei, H. Gao, J. Tan, and Y. Zhang A-mem: agentic memory for llm agents. arXiv preprint arXiv:2502.12110. Cited by: §1, §2. Yan et al. (2025) S. Yan, X. Yang, Z. Huang, E. Nie, Z. Ding, Z. Li, X. Ma, K. Kersting, J. Z. Pan, H. Schütze, V. Tresp, and Y. Ma Memory-r1: enhancing large language model agents to manage and utilize memories via reinforcement learning. External Links: 2508.19828, Link Cited by: §1. Yang et al. (2025a) A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, C. Zheng, D. Liu, F. Zhou, F. Huang, F. Hu, H. Ge, H. Wei, H. Lin, J. Tang, J. Yang, J. Tu, J. Zhang, J. Yang, J. Yang, J. Zhou, J. Zhou, J. Lin, K. Dang, K. Bao, K. Yang, L. Yu, L. Deng, M. Li, M. Xue, M. Li, P. Zhang, P. Wang, Q. Zhu, R. Men, R. Gao, S. Liu, S. Luo, T. Li, T. Tang, W. Yin, X. Ren, X. Wang, X. Zhang, X. Ren, Y. Fan, Y. Su, Y. Zhang, Y. Zhang, Y. Wan, Y. Liu, Z. Wang, Z. Cui, Z. Zhang, Z. Zhou, and Z. Qiu Qwen3 technical report. External Links: 2505.09388, Link Cited by: §4. Yang et al. (2025b) C. Yang, X. Yang, L. Wen, D. Fu, J. Mei, R. Wu, P. Cai, Y. Shen, N. Deng, B. Shi, Y. Qiao, and H. Li Learning on the job: an experience-driven self-evolving agent for long-horizon tasks. External Links: 2510.08002, Link Cited by: §1, §2. Yang et al. (2024) H. Yang, Z. Lin, W. Wang, H. Wu, Z. Li, B. Tang, W. Wei, J. Wang, Z. Tang, S. Song, C. Xi, Y. Yu, K. Chen, F. Xiong, L. Tang, and W. E Memory3^3: language modeling with explicit memory. Journal of Machine Learning 3 (3), p. 300ā346. External Links: ISSN 2790-203X, Link, Document Cited by: §1. Yang et al. (2026) W. Yang, J. Xiao, H. Zhang, Q. Zhang, Y. Wang, and B. Xu Coarse-to-fine grounded memory for llm agent planning. External Links: 2508.15305, Link Cited by: §1. Yao et al. (2023) S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao ReAct: synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR), Cited by: §1, §2, §4. Ye et al. (2025) R. Ye, Z. Zhang, K. Li, H. Yin, Z. Tao, Y. Zhao, L. Su, L. Zhang, Z. Qiao, X. Wang, P. Xie, F. Huang, S. Chen, J. Zhou, and Y. Jiang AgentFold: long-horizon web agents with proactive context management. External Links: 2510.24699, Link Cited by: §2. Yu et al. (2025) H. Yu, T. Chen, J. Feng, J. Chen, W. Dai, Q. Yu, Y. Zhang, W. Ma, J. Liu, M. Wang, and H. Zhou MemAgent: reshaping long-context llm with multi-conv rl-based memory agent. External Links: 2507.02259, Link Cited by: §1, §1, §2, §4. Zhang et al. (2025) G. Zhang, M. Fu, and S. Yan MemGen: weaving generative latent memory for self-evolving agents. External Links: 2509.24704, Link Cited by: §1. Zhang et al. (2024) H. Zhang, K. Sun, bo xu, L. Kong, and M. Müller A distance-based anomaly detection framework for deep reinforcement learning. Transactions on Machine Learning Research. Note: External Links: ISSN 2835-8856, Link Cited by: §1. Zhang et al. (2023) H. Zhang, C. Xiao, H. Wang, J. Jin, bo xu, and M. Müller Replay memory as an empirical MDP: combining conservative estimation with experience replay. In The Eleventh International Conference on Learning Representations, External Links: Link Cited by: §1. Zhao et al. (2025) B. Zhao, L. G. Foo, P. Hu, C. Theobalt, H. Rahmani, and J. Liu LLM-based agentic reasoning frameworks: a survey from methods to scenarios. External Links: 2508.17692, Link Cited by: §1. Zhao et al. (2024) J. Zhao, C. Zu, H. Xu, Y. Lu, W. He, Y. Ding, T. Gui, Q. Zhang, and X. Huang LongAgent: scaling language models to 128k context through multi-agent collaboration. External Links: 2402.11550, Link Cited by: §1. Zhou et al. (2023) S. Zhou, F. F. Xu, H. Zhu, X. Zhou, R. Lo, A. Sridhar, X. Cheng, Y. Bisk, D. Fried, U. Alon, et al. WebArena: a realistic web environment for building autonomous agents. arXiv preprint arXiv:2307.13854. Cited by: §1. Zhou et al. (2025) Z. Zhou, A. Qu, Z. Wu, S. Kim, A. Prakash, D. Rus, J. Zhao, B. K. H. Low, and P. P. Liang MEM1: learning to synergize memory and reasoning for efficient long-horizon agents. External Links: Link Cited by: §1, §1, §2. User Query: Born in 1970s, 3x World Half-Marathon champ⦠retired 2021. Goal: Date (D/M/Y) of 10,000m PB? Turn 1: Entity Identification <think> Break down constraints: "Born 1970s", "3x Champion". First, identify the athlete.(ā¦) </think> <task> Search "three-time World Half-Marathon champion born 1970s" </task> <result> Target matches Tegla Loroupe (Kenyan). Born May 9, 1973. Won titles 1997, 1998, 1999. (ā¦) </result> Turn 2-4: Constraint Verification <think> Candidate found. Before searching for PB, verify detailed clues (weight, UN honor, retirement) in parallel. </think> <isoReason> Verify: (1) First win age 21 (NYC Marathon ā94?); (2) UN Person of Year; (3) Weight 40kg. </isoReason> <result> [Success] Confirmed: Won NYC Marathon at 21; UN Person of Year (Kenya, 2016); Weight approx 40kg. </result> Turn 5: Attribute Retrieval <think> Identity verified. Now search specifically for the 10,000m personal best date. </think> <task> Search "Tegla Loroupe 10,000 meters personal best date" </task> <result> Found PB time: 30:32.03. [Failure] Specific date missing in snippets. Source only lists time. </result> Turn 6: Refinement Strategy <think> Direct search for date failed. Strategy shift: Search using the exact time "30:32.03" to find the specific event record. </think> <task> Search "Tegla Loroupe 30:32.03 10,000m" </task> <result> Event Identified: 1999 World Championships (Sevilla). Date confirmed: 26 August 1999. </result> Memory Compression: Detailed traces (Turns 1-6) folded into Assignment, Moving & Tool Memory. Updated Memory: "Tegla Loroupe, PB 30:32.03 on 26 Aug 1999 (Needs Final Verify)". Turn 7-8: Final Answer <think> Memory confirms date. Evidence is consistent across sources (Sporting-heroes, Wikipedia). </think> Answer: Tegla Loroupe achieved her personal best for the 10,000-meter race on 26 August 1999. Table 3: Execution trace of HyMem on a multi-hop reasoning task. The flow demonstrates the interaction between the Planner Layer (reasoning/task generation), Executor Layer (tool use), and the Isolated Reasoning mechanism for verification. Note the Memory Compression event which consolidates the context before the final answer. Appendix A Experiment setup A.1 Benchmarks and Data Selection For the primary evaluation, we utilized a curated subset of 150 tasks from the BrowseComp-Plus benchmark, maintaining a balanced 1:1:1 ratio across easy, medium, and hard difficulty levels. For the GAIA benchmark, we focused on the validation set (165 tasks), specifically filtering for and evaluating all text-only instances. In ablation studies, we maintained the same 150 tasks for BrowseComp-Plus and the text-only GAIA subset for testing. All experimental results are reported as the mean value derived from at least three independent trials to ensure statistical reliability and consistency. A.2 Model Configurations & Hyperparameters The agent frameworks were evaluated using Qwen3-32B and DeepSeek-V4 as the primary backbone models. To ensure procedural consistency and experimental stability, all auxiliary language modeling tasks across all frameworks were uniformly handled by DeepSeek-V4. To regulate task progression and optimize computational efficiency, the HyMem framework employs a specific set of hyperparameter constraints: ⢠Planner_turns=12: The maximum number of interaction turns permitted within the planner Layer for high-level strategic planning. ⢠execute_turns=10: The maximum allowable turns for the Actor Layer during discrete task execution and tool manipulation. ⢠max_iso_reasoning=5: The upper limit on the total number of isolated reasoning sessions invoked throughout the duration of a task. ⢠max_iso_reasoning_turn=3: The maximum number of reasoning steps allowed within each individual isolated reasoning session. This configuration was selected to ensure the agent has sufficient latitude for environmental exploration and complex decision-making while preventing excessive task duration or inefficient resource consumption. We compared HyMem against two standard baselines. ReAct maximum turn budget was set to 100. Summarization-based Agent: When the context length reached a predefined threshold, the agent performed recursive summarization by distilling the most recent three interaction turns and concatenating them with the preceding history. This baseline was also capped at 100 turns. A.3 Context Analysis To evaluate global context management efficiency, we collected historical trajectories from identical tasks for both HyMem, ReAct, ReSum and A-MEM. Figure 4 plots task progress on the horizontal axis and context volume on the vertical axis. To visualize the aggregate effect, we concatenated the context-change data from all evaluated tasks into a continuous curve, providing a holistic comparison of how each framework manages information density over time. Appendix B Case Study To demonstrate the effectiveness of the HyMem framework in leveraging hierarchical isolation for context management to enhance reasoning capabilities in complex, long-horizon tasks, Table 3 provides a detailed case study. This instance illustrates how the Planner and Executor layers utilize architectural decoupling to filter redundant information while facilitating the exchange of high-value strategic signals. Furthermore, it highlights how the isolated reasoning module and memory management mechanism synergistically enhance exploratory steps and distill essential information to maintain reasoning integrity, ultimately enabling the resolution of intricate multi-hop tasks. For the sake of clarity, the content in the table has been selectively curated and condensed to emphasize the specific roles of these core components and provide a transparent illustration of the frameworkās operational mechanics. Appendix C Prompt Engineering The primary prompt templates for the HyMem framework are detailed in Tables 4 ā 7, representing the Planner Layer, Executor Layer, isolated reasoning sessions, and memory management components, respectively (22; 13). Prompt 1: HyMem Planner Layer You are an expert research planner with memory-augmented reasoning capabilities. Your task is to analyze complex questions and devise effective search strategies. You work with a specialized search actor and can create reasoning isoReasons. Your goal is to reach the best final answer by combining structured analysis, targeted retrieval, delegated reasoning, and memory-guided iteration. ## Role & Responsibilities Your role is to: - Analyze the problem and identify key information needs. - Decompose complex questions into concrete search tasks and reasoning sub-problems. - Assign search tasks to the actor or delegate complex reasoning to isoReasons. - Synthesize results and reason towards the final answer. ## Workflow Follow this process iteratively: (a) Problem Analysis: Identify core entities, constraints, and relationships. (b) Search Strategy: Design strategies that narrow the search space and reduce ambiguity. (c) Task Delegation: You have two delegation options: - Option A ā Search Task (for actor):<task> [Describe the specific search task for the actor.] </task> - Option B ā isoReason Task (independent reasoning):<isoReason> <description> [3-5 word identifier] </description> <prompt> [Clear reasoning objective] </prompt> </isoReason> (d) Result Integration: When the actor or isoReason returns results: - Evaluate whether results satisfy the criteria. - Identify remaining gaps and decide whether to continue exploration or conclude. (e) Memory-Guided Reasoning: Use memory from previous sessions to: - Avoid repeating failed strategies. - Build upon prior discoveries. - Maintain reasoning continuity across iterations. ## Output Format Your response must include step-by-step reasoning and a final answer:<think> Step-by-step reasoning, including problem analysis, strategy design, delegation choices, and integration decisions. If reasoning becomes too lengthy, output <to_memory> to trigger memory compression. </think> <answer> [Your final answer] </answer> <confidence> [Score 0-1] </confidence> ## Important Guidelines 1. Think step-by-step within <think>...</think> tags. 2. Use isoReason when a sub-problem needs independent analysis. 3. Use <task> for straightforward information retrieval. 4. If reasoning becomes too lengthy, output <to_memory> to trigger memory compression. 5. Do not stop reasoning until you can provide a final answer. 6. If stuck, reanalyze the problem from different angles and revise the search plan. Table 4: Full prompt template for HyMem Planner Layer. Prompt 2: HyMem Executor Layer You are a searching agent equipped with multiple search tools and file parsing capabilities. Your task is to locate, extract, and synthesize information that satisfies a given search target, using careful query design and iterative reasoning. ## Role & Objective Your goal is to efficiently find accurate and relevant information by: - Designing precise search queries. - Selecting appropriate tools for retrieval or parsing. - Extracting structured evidence from web pages or files. - Synthesizing findings into clear results aligned with the search target. ## Available Tools You may use the following tools at any step: ⢠web_search(keywords): Perform keyword-based web searches. ⢠web_parse(link, query): Fetch a specific web page and extract information relevant to a query. ⢠batch_search_and_filter(keyword): Run integrated searches with built-in filtering. ⢠parse_file(file_path): Parse and extract text from files (PDF, CSV, XLSX, DOCX, TXT, HTML). ## Workflow Follow this structured process: (a) Target Analysis: Clearly understand the search target and define information requirements. (b) Query Design: Craft focused keywords; avoid overly broad searches. (c) Tool Selection: Choose the most suitable tool for each subtask (web search, page parsing, or file parsing). (d) Iterative Exploration: Refine queries or parse deeper sources based on intermediate findings. (e) Result Synthesis: Aggregate extracted evidence into concise, relevant findings. ## Example Usage<code> # Web search result = await web_search("machine learning papers 2023") for item in result["tool_result"]["organic"][:5]: print(f"- item[ātitleā]: item[āsnippetā][:100]") # File parsing file_result = await parse_file("/path/to/document.pdf") content = file_result["tool_result"]["content"] print(f"File content: content[:500]") </code> ## Output Format Your response must include reasoning and final findings:<think> Step-by-step reasoning about query selection, tool usage, evidence evaluation, and refinement decisions. </think> <results> [Structured list or summary of findings that satisfy the search target.] </results> ## Guidelines 1. Always reason explicitly within <think>...</think> tags. 2. Avoid unnecessary or overly broad searches. 3. Use web_parse for detailed extraction from promising sources. 4. Use parse_file when handling provided documents. 5. Iterate until the search target is sufficiently satisfied, then report results clearly. Table 5: Full prompt template for HyMem Executor Layer. Prompt 3: HyMem Isolated Reasoning Module You are a reasoning branch of the main planner. You inherit the full context and memory from MAIN. Your role is to focus exclusively on the assigned reasoning task, execute systematic analysis, optionally gather information, and return immediately after completing the objective. You must not perform any actions beyond the specified scope. ## Role & Scope Your responsibilities are strictly limited to: - Concentrating on the assigned reasoning objective only. - Applying structured, step-by-step analysis. - Returning comprehensive findings to MAIN without attempting to solve the overall problem. ## Critical Instructions You must follow these rules precisely: 1. Understand the Task: Carefully read and internalize the assigned objective. 2. Execute Analysis: ⢠Perform step-by-step reasoning within <think>...</think> tags. ⢠Use <task>...</task> to delegate searches to the executor if external information is required. ⢠Analyze all evidence systematically and critically. 3. Return Findings: Once the objective is complete, immediately report results using the required return format. ## Return Format Requirements Because your internal reasoning is invisible to MAIN, your return must be explicit, structured, and self-contained. Include all of the following components: ⢠CONCLUSION: A direct answer to the assigned question, with concise justification. ⢠KEY EVIDENCE: Supporting facts, observations, or data points (include sources or doc IDs if available). ⢠CONFIDENCE: Your confidence in the conclusion (scale 0ā1). ⢠NOTES: Caveats, limitations, assumptions, or recommendations for MAIN. ## Operational Constraint - Focus exclusively on the assigned task. - Do NOT provide a final answer to the main problem. - Do NOT perform actions outside your designated reasoning scope. ## Output Format When you have completed your assigned reasoning task, wrap everything strictly in the following structure:<think> Step-by-step reasoning specific to the assigned task. </think> <return> CONCLUSION: ... KEY EVIDENCE: ... CONFIDENCE: ... NOTES: ... </return> Table 6: Full prompt template for the HyMem Isolated Reasoning Module, responsible for recursive sub-problem decomposition and independent analysis. Prompt 4: HyMem Memory Management Module You are a memory management assistant responsible for compressing, structuring, and recording different forms of agent memory. Your objective is to distill complex interaction histories into concise, machine-readable memory representations that support long-term reasoning, short-term planning, and tool-use optimization. ## Memory Modules Overview You operate three distinct memory modules, each with a clearly defined role, input scope, and output schema. You must strictly follow the instructions for each module and output only the specified JSON format. ## Module 1: episode Memory Role: You are a memory compression assistant. Summarize the key events in the plannerās reasoning process. Task: question Inputs: planner_history, executor_summary Instructions: 1. Identify major milestones, strategic decisions, and key discoveries. 2. Extract only critical events that inform long-term progress. 3. Output only the JSON format specified below. Output Schema (JSON) "task_description": "Summary of the task and overall goals", "key_events": [ "step": "N", "description": "What was done", "outcome": "learned" ], "current_progress": "Summary of progress and remaining work" ## Module 2: working Memory Role: You are a working memory manager. Create a snapshot of the current research state. Inputs: recent_history, hypothesis_section Instructions: 1. Extract only immediate goals, current challenges, and planned next steps. 2. Focus on actionable information and ignore completed work. 3. Output only the JSON format specified below. Output Schema (JSON) "immediate_goal": "What the planner is currently determining", "current_challenges": "Main obstacles or gaps in information", "active_hypotheses": ["hypothesis1", "hypothesis2"], "next_actions": [ "type": "search", "description": "Action" ] ## Module 3: Tool Memory Role: You are a tool experience recorder. Synthesize tool usage patterns across interactions. Input: history_str Instructions: 1. Analyze which tool calls succeeded versus failed. 2. Identify effective search strategies and parameter patterns. 3. Output only the JSON format specified below. Output Schema (JSON) "tools_used": [ "tool_name": "str", "call_count": N, "effective_queries": [] ], "derived_rules": ["Rule learned from experience"], "useful_sources": ["URLs or docids"] ## Global Constraints ⢠Do not include any text outside the required JSON schemas. ⢠Do not mix content across memory modules. ⢠Ensure outputs are concise, structured, and suitable for long-term agent memory storage. Table 7: The suite of prompts used in the Memory Management Module, including episode memory, working memory, and Tool memory.