Published 2025-03-30
How to Cite

This work is licensed under a Creative Commons Attribution 4.0 International License.
Abstract
The proliferation of intelligent agents based on large language models (LLMs) has shifted the focus towards efficient task planning and tool invocation for complex tasks. Traditionally, agents from scratch for each task, leading to inefficiencies in task planning and tool usage. This study introduces a history-driven task planning method to leverage execution history and enhance task planning efficiency. The method addresses two key issues: the repetitive exploration of task planning paths and the regeneration of intermediate code artifacts in similar tasks. By transforming historical task planning trajectories into actionable experience and automating the generation of reusable modules, the approach significantly reduces LLM token consumption and increases task completion rates. The study also presents the History-based Agent Optimization Kit (HAOK), which integrates seamlessly with existing agents to optimize prompts and enhance performance.