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

Taeil Kim, Kangsan Kim, Sung Ju Hwang

arXiv:2608.07169 · 2026-08-11 공개 · arXiv · PDF

llm-agents teacher-student hierarchical-memory knowledge-transfer tool-use-benchmarks workflow-memory gpt-5-mini agent-memory-distillation

Abstract

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.

한국어 요약

한 줄 요약

AMD는 GPT-5-mini의 계층적 메모리를 활용해 4B-8B 소형 모델의 정확도를 평균 27.2%p 향상시키는 훈련 없는 메모리 디스틸레이션 프레임워크다.

핵심 기여도

핵심 아이디어

소형 언어 모델은 성공적인 트래젝토리를 생성하는 능력이 제한되어 있어, 메모리 활용이 효과적이지 않다. 이에 AMD는 대형 선생 에이전트(GPT-5-mini)의 성공 트래젝토리에서 **계층적 메모리**를 추출하여 소형 학생 에이전트에 전달하는 훈련 없는 프레임워크를 제안한다.

**Workflow 메모리**는 작업 수준 전략을 인코딩하여 학생이 작업을 하위 작업으로 분해하도록 돕는다. **Subtask 메모리**는 중간 수준의 구체적인 행동 예시를 제공해 복잡한 작업에서 가장 큰 성능 향상을 이끌어낸다. **Function 메모리**는 도구 호출 시 발생한 오류에 따라 반응적으로 검색되어, 도구 사용 규칙과 흔한 실수를 학습하게 한다. 이는 학생이 선생의 경험을 다양한 작업 수준에서 효과적으로 활용할 수 있도록 한다.

기술적 접근법

주요 결과

의의 및 한계

AMD는 소형 에이전트가 대형 에이전트의 경험을 훈련 없이 계층적으로 활용할 수 있는 첫 번째 체계적인 접근법이다. 이는 소형 모델의 메모리 활용 능력을 극대화하고, 복잡한 작업에서 성능을 크게 향상시킨다. 또한, **Subtask 메모리**의 중요성은 복잡한 작업에서 구체적인 행동 예시가 학습에 필수적임을 보여준다.

그러나, 선생-학생 간의 **역량 격차**는 여전히 메모리 전달의 주요 장애물이다. 예를 들어, 선생 메모리가 "로그인 후 플레이리스트 시작"과 같은 전략을 제안하더라도 학생이 로그인 절차 자체를 알지 못하면 적용이 어렵다. 또한, 소형 모델은 **인-컨텍스트 학습 능력**이 제한되어 있어, 메모리를 효과적으로 해석하는 데 어려움이 있을 수 있다.

실용적 활용

AMD는 소형 LLM 에이전트가 복잡한 도구 기반 작업(예: 앱 자동화, API 사용 등)에서 대형 모델의 경험을 활용할 수 있도록 지원한다. 특히, 컴퓨팅 자원이 제한된 환경에서 **4B 규모 모델**이 GPT-5-mini의 메모리를 통해 높은 성능을 달성할 수 있어, 클라우드 없는 에지 AI나 저비용 AI 서비스 개발에 유용하게 활용될 수 있다.