Learning from Failures: Heterogeneous Graph Memory for Small Language Model Tool-Using Agents

Jiaxing Li, Lei Song, Rui Dong, Youyong Kong
9/23/2026
cs.LG

No confident code implementation found for this paper.

Abstract

Small and medium-sized language models offer cost-effective executors for tool-using agents, making them attractive for local and large-scale deployment. However, in long-horizon and stateful environments, they often make structural errors such as missing required observations, performing premature writes, repeating failed calls, and violating action preconditions. These errors can lead to incorrect state updates, policy violations, and costly or irreversible consequences, making reliable tool execution a critical deployment challenge. Existing fine-tuning approaches require substantial data and computation, while flat memory may retrieve failed actions without preserving their causal context or safety conditions. In this paper, we propose FRESH, a Failure-aware Retrieval framework over Experience-Structured Heterogeneous graphs, which transforms historical successes and failures into structured external experience for tool-using agents. By explicitly modeling the dependencies among tasks, actions, errors, repairs, and execution conditions, FRESH helps frozen language models reuse reliable strategies, avoid recurring failures, and make safer decisions in stateful tool interactions. Experiments on $τ$-Bench and AppWorld with multiple open-source models show that FRESH consistently improves task success and tool-use reliability over no-memory agents and representative memory-based baselines.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2026learning,
  title  = {Learning from Failures: Heterogeneous Graph Memory for Small Language Model Tool-Using Agents},
  author = {Jiaxing Li and Lei Song and Rui Dong and Youyong Kong},
  year   = {2026},
  eprint = {2609.28003},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.28003v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.28003.svg)](https://codeofpaper.com/paper/2609.28003)

Discussion