小模型通过模仿大模型的分层记忆,显著提升工具使用能力。
Agent Memory Distillation: Empowering Small LLM Agents with Hierarchical Teacher Memory

- 用分层记忆结构迁移大模型经验,包括任务策略、子任务示例和函数调用规范。
- 在三个基准上平均准确率提升最高达27.2个百分点,4B小模型受益最明显。
- 无需训练,可适配不同规模小模型,特别适合资源受限场景。
记忆系统在提升智能体性能方面展现出潜力,但对小型语言模型而言仍未充分探索,因其自身难以生成足够成功的轨迹。我们提出一种免训练框架Agent Memory Distillation(AMD),通过分层记忆将大型教师智能体的结构化知识转移给小型学生智能体。AMD从教师成功轨迹中构建三种互补记忆:工作流记忆编码任务级策略,子任务记忆提供中间粒度的行为范例,函数记忆捕捉函数调用规范与常见错误。工作流与子任务记忆在任务开始时主动注入,函数记忆则在工具调用出错时被动检索。我们在三个工具使用基准上评估了四个学生模型(4B-8B参数),以GPT-5-mini为教师,分别在AppWorld、BFCL V3和ToolSandbox上实现平均准确率提升27.2%p、11.2%p和3.4%p,且始终优于现有基于记忆的基线方法。进一步分析表明,子任务记忆贡献最大,教师效果依赖于教师能力与学生兼容性,4B规模的学生获益最显著。
原文摘要 · Abstract (English)
Memory systems have shown promise for improving agent performance, but their potential remains largely unexplored for small language models, which struggle to generate sufficient successful trajectories on their own. We propose Agent Memory Distillation (AMD), a training-free framework that transfers structured knowledge from a large teacher agent to a small student agent through hierarchical memory. AMD constructs three complementary memory types from successful teacher trajectories: Workflow memory encodes task-level strategies, Subtask memory provides concrete behavioral examples at an intermediate granularity, and Function memory captures per-function calling conventions and common pitfalls. Workflow and Subtask memories are injected proactively at the start of each task, while Function memory is retrieved reactively upon tool-calling errors. We evaluate AMD on three tool-use benchmarks using four student models (4B-8B parameters) with GPT-5-mini as the teacher, achieving average accuracy gains of 27.2%p, 11.2%p, and 3.4%p on AppWorld, BFCL V3, and ToolSandbox, while consistently outperforming existing memory-based baselines. Further analysis shows that Subtask memory contributes the largest gains, teacher effectiveness depends on both teacher capability and student compatibility, and 4B-sized students benefit most from AMD.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。