Agent Memory Distillation: Empowering Small LLM Agents with Hierarchical Teacher Memory

AuthorsTaeil Kim, Kangsan Kim, Sung Ju Hwang

arXiv 20262026

TL;DR

Agent Memory Distillation uses hierarchical Workflow, Subtask, and Function memories to transfer GPT-5-mini experience, giving Qwen3-4B +34.52%p accuracy on AppWorld over zero-shot.

SharePost on XLinkedIn

Read our summary here, or open the publisher PDF on the next tab.

THE PROBLEM

Small agents lack successful memories and naive teacher transfer barely helps

Agent Memory Distillation targets small agents whose own memories are dominated by failures, limiting gains from experience reuse despite teacher success rates.

Even when GPT-5-mini memories are naively transferred, the capability gap means students still fail tasks like multi-step tool use, capping downstream accuracy improvements.

HOW IT WORKS

Agent Memory Distillation with hierarchical teacher memories

Agent Memory Distillation organizes teacher experience into Workflow memory, Subtask memory, and Function memory, then retrieves them with proactive and reactive injection for the student.

You can think of Workflow memory as a high-level playbook, Subtask memory as worked examples, and Function memory as an API cookbook with concrete call patterns.

This hierarchical design lets Agent Memory Distillation give small agents structured guidance that a plain context window or flat task-level memory cannot provide.

DIAGRAM

Student-time memory retrieval and injection flow

This diagram shows how Agent Memory Distillation retrieves Workflow, Subtask, and Function memories during student inference with proactive and reactive injection.

DIAGRAM

Evaluation and ablation pipeline for Agent Memory Distillation

This diagram shows how Agent Memory Distillation builds teacher memories, runs student baselines, and performs component ablations across benchmarks.

PROCESS

How Agent Memory Distillation Handles a Multi turn Tool Use Task

  1. 01

    Hierarchical Memory Generation

    Agent Memory Distillation runs the teacher on tasks to collect successful trajectories and builds Workflow memory, Subtask memory, and Function memory from these traces.

  2. 02

    Proactive Injection of Workflow and Subtask Memories

    Agent Memory Distillation retrieves a Workflow memory insight and relevant Subtask memory segments, then injects them into the student system prompt before execution.

  3. 03

    Student Reasoning with Memory Guidance

    Guided by Workflow memory and Subtask memory, the student plans tool sequences and follows concrete behavioral examples while interacting with the environment.

  4. 04

    Reactive Function Memory Injection

    When tool calls fail, Agent Memory Distillation retrieves Function memory entries for the failing function and appends targeted call examples to fix errors.

KEY CONTRIBUTIONS

Key Contributions

  • 01

    Agent Memory Distillation framework

    Agent Memory Distillation introduces a training free teacher to student memory transfer framework using Workflow memory, Subtask memory, and Function memory for small agents.

  • 02

    Hierarchical teacher memory design

    Agent Memory Distillation shows that Subtask memory provides the largest gains, with Workflow memory and Function memory complementing it across task, subtask, and function levels.

  • 03

    Comprehensive empirical study

    Agent Memory Distillation achieves up to 54.17% accuracy on AppWorld and average gains of 27.2%p, 11.2%p, and 3.4%p on AppWorld, BFCL V3, and ToolSandbox.

RESULTS

By the Numbers

AppWorld accuracy

49.40%

+34.52%p over Qwen3-4B Zero-shot

BFCL V3 accuracy

38.50%

+23.00%p over Qwen3-4B Zero-shot

ToolSandbox accuracy

20.16%

+3.88%p over Qwen3-4B Zero-shot

Average accuracy

36.02%

+20.47%p over Qwen3-4B Zero-shot

On AppWorld, BFCL V3, and ToolSandbox, which test multi app Python APIs, structured function calling, and stateful tool use, Agent Memory Distillation consistently raises small agent accuracy far above zero shot baselines.

BENCHMARK

By the Numbers

On AppWorld, BFCL V3, and ToolSandbox, which test multi app Python APIs, structured function calling, and stateful tool use, Agent Memory Distillation consistently raises small agent accuracy far above zero shot baselines.

BENCHMARK

Main results on AppWorld for Qwen3-4B

Accuracy (%) on AppWorld test_normal comparing Agent Memory Distillation to memory based baselines using teacher trajectories.

BENCHMARK

Ablation of memory components on AppWorld for Qwen3-4B

Accuracy (%) on AppWorld as Agent Memory Distillation adds Workflow, Subtask, and Function memories.

KEY INSIGHT

The Counterintuitive Finding

For Qwen3-4B on AppWorld, GPT-5-mini as teacher yields 49.40% accuracy, beating DeepSeek V4 Pro despite DeepSeek’s higher 81.55% teacher accuracy.

This is surprising because one might expect the strongest teacher, GPT-5.5 at 91.08% accuracy, to always transfer best, but teacher student compatibility matters more than raw teacher strength.

WHY IT MATTERS

What this unlocks for the field

Agent Memory Distillation shows that small 4B to 8B agents can reach or surpass GPT-5-mini performance using only hierarchical teacher memories.

Builders can now deploy cheaper small agents that still follow rich multi level tool use strategies without any student fine tuning or parameter updates.

~14 min read← Back to papers

Related papers

BenchmarkAgent Memory

Active Context Compression: Autonomous Memory Management in LLM Agents

Nikhil Verma

· 2026

Focus Agent adds start_focus, complete_focus, a persistent Knowledge block, and an optimized Persistent Bash plus String-Replace Editor scaffold to actively compress context during long software-engineering tasks. On five hard SWE-bench Lite instances against a Baseline ReAct agent, Focus Agent achieves 22.7% token reduction (14.9M → 11.5M) while matching 3/5 = 60% task success.

Agent Memory

ActMem: Bridging the Gap Between Memory Retrieval and Reasoning in LLM Agents

Xiaohui Zhang, Zequn Sun et al.

· 2026

ActMem transforms dialogue history into atomic facts via Memory Fact Extraction, groups them with Fact Clustering, links them through a Memory KG Construction module, and uses Counterfactual-based Retrieval and Reasoning for action-aware answers. On ActMemEval, ActMem reaches 76.52% QA accuracy with DeepSeek-V3, beating LightMem’s 63.97% by 12.55 points and NaiveRAG’s 61.54%.

Questions about this paper?

Paper: Agent Memory Distillation: Empowering Small LLM Agents with Hierarchical Teacher Memory

Answers use this explainer on Memory Papers.

Checking…