arXiv:2610.27032cs.AIOct 2026

Manuscript Offprint

arXiv:2610.27032

M-Plan: Comprehensive Planning For LLM Agents with Memory Arrangement

Ziyang Liu, Jiakang Yuan, Jiayuan Fan, Tao Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Large language model (LLM)-based agents have recently demonstrated outstanding performance in single-turn tasks, yet they continue to struggle with long-horizon tasks, particularly in environments without prior training. A key limitation of single LLMs is their difficulty in processing long contexts, which stems from weaknesses in continuous decision-making and reasoning capabilities. Although existing multi-agent systems (MAS) equipped with long-term memory bases can partially address this gap, they mostly rely on knowledge reuse or summarization—an approach that is often constrained by directly retrieval without any adaptation for the current task, while the retrieved memory may contain much history noises waiting to be preprocessed. In contrast, MAS characterized by task-specific guidance often lack long-term memory specifically designed for the guidance. To address these challenges, we propose M-Plan, a closed-loop MAS framework that integrates long-term and short-term memory. By combining global-local and past-current guidance, M-Plan enhances agents' performance on multi-turn tasks while maintaining a plug-and-play design. During task execution, agents receive task-specific milestones and insights, and are provided with local hints only when confusion arises, which form global-local guidance together. These guidance generation and utilization construct the short-term memory as well. After task completion, relevant information about the current task is optimized or reorganized before being sent to the long-term memory storage for future retrieval. The designments mentioned above build a comprehensive framework different from other individual long-term or short-term memory works. Extensive experiments on multi-turn tasks including ALFWorld, Webshop, and PDDL across diverse models demonstrate that M-Plan outperforms multiple baseline methods in both accuracy and efficiency.

1 INTRODUCTION

Large language models (LLMs) have been widely applied across numerous domains, and extensive research has demonstrated their strong capability to solve a diverse range of tasks [1]. With the increasing continuity and complexity of real-world tasks in daily human activities, LLMs are required to tackle multi-turn, long-horizon tasks more frequently. Such tasks demand sustained decision-making and reasoning across multiple turns, while also requiring models to maintain and process long contexts. However, these demands remain challenging for existing LLMs, which, despite their remarkable performance on single-turn instructions, often struggle in multi-turn scenarios [2; 3]. Common issues observed in LLM-based agents include forgetting information from intermediate turns, overemphasizing initial and final turns, which indicate that a single LLM is insufficient to handle increasingly complex contexts.

To address these challenges, researchers have proposed two major approaches for adapting LLM-based agents. The first exploits training to optimize agents on downstream tasks [4; 5; 6; 7; 8; 9; 10], primarily including Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL), typically with human-annotated training sets, which are sometimes hard to get. The second adopts training-free

∗^{*}Corresponding author.

Figure

Figure 1: The task-specific guidance consists of milestones and insights: milestones guide the action agent to follow a global task-solving path, while insights provide detailed considerations and important task-relevant knowledge; conditional hint when meeting action trap (invalid action). The hint will help correct the action in the next step.

methods, which typically employ a specialized multi-agent system (MAS) to process long contexts. Most existing training-free approaches integrate MAS with long term memory mechanisms [11; 12; 13; 14], usually incurring lower computational costs with greater flexibility and interpretability. For example, through setting specific agents to examine the task execution result, process successful and failed trajectories, ReasoningBank [14] can learn from historical experiences to adapt to other tasks, and construct a visual external memory base, which is more interpretable than training. As for short-term memory, characterized by a combination of global and step-wise guidance [15; 16; 17], those works are able to build a overall route, possibly with local hints, helping the action agent make decision more wisely.

Despite remarkable progress in MAS-based approaches, the aforementioned methods still suffer from several limitations. For long-term memory, typical approaches involve reusing historical experience or summarizing general knowledge, but these methods struggle to ensure generalization, and long historical trajectories may introduce noise and instability. For short-term memory, stepwise generation inevitably incurs substantial token consumption, whereas relying solely on global guidance often fails to provide complete task instructions, since high-level blueprints or milestones lack the necessary details and action-related knowledge required for execution. In addition, existing MAS-based planning works generally lack memory association, which weakens their self-evolution capabilities and limits their applicability to real-world scenarios.

To address these limitations, we propose M-Plan, a long and short-term memory MAS framework. The short-term memory integrates comprehensive task-specific global guidance, as shown in the left part of Fig.1 and local hints in the right part. With task-specific milestones and insights, our short-term memory can digest the retrieved information into task-specific guidance by refusing simply retrieval and adding insights to complement details, solving reuse problems in individual long-term memory. Not like the former step-wise guidance work, considering that action traps and invalid actions remain prevalent in most multi-turn tasks, our conditionally triggered hints, can reduce token consumption while helping agents correct their actions in subsequent steps. However, a short-term memory usually lacks a great partner in similar work, and our long-term memory complements short-term memory for this purpose. Precisely, to better adapt agents to new tasks, M-Plan maintains a long-term memory base for guidance, helping task-specific short-term memory further enhances the effectiveness of long-term memory during the current task. To improve the quality of information stored in the memory base and connect the short- and long-term memory, we further design an OPTIMIZER module to refine completed task trajectories before they are stored as long-term memory, helping the short- and long-term memory achieve better complementarity.

Figure

Figure 2: The whole framework of M-Plan, containing long short-term memory, global-local guidance (milestones, insights, hints), and an optimizer module to form the closed-loop. More details can be seen in Section 3.

We evaluate M-Plan on three commonly used multi-turn benchmarks: ALFWorld[18], Webshop[19] and PDDL[20], which are filled with long-horizon and context-rich tasks. Experiments on two models of different scales demonstrate that M-Plan outperforms classic and typical baselines in terms of effectiveness (accuracy and reward). To assess efficiency, we report the average steps, redefined steps and compare valid token consumption of each successful task. Additionally, ablation studies verify the value of each designed module in enhancing performance.

The contributions of this paper can be summarized as follows:

  1. We propose M-Plan, a MAS framework that integrates long-term memory storage, short-term memory planning mechanisms, and global-local guidance. This framework eliminates the need for reusing abstract knowledge, maintains the generation of valuable guidance through long-term memory, avoids uncertainty, and controls token costs via conditional local guidance. This comprehensive closed-loop framework is effective across different models and can be theoretically extended to various multi-turn tasks.

  2. We construct a closed-loop and complete system. In M-Plan, milestones and insights form a complete guidance system, with conditional local hints providing step-wise assistance when agents encounter confusion, with long term memory offering information from optimizer as generation references, which can abandon traditional reuse-based approaches for guiding agent-environment interactions.

  3. We conduct experiments on challenging benchmarks, and by leveraging task-specific information, M-Plan utilizes tokens more efficiently while outperforming all baseline methods using different base models.

References (41)