Generalizing Experience for Language Agents with Hierarchical MetaFlows

Sheng-Da Fan, Xin Cong, Zhong Zhang, Yuepeng Fu, Ye-Sai Wu +4 more
1/1/2025

No confident code implementation found for this paper.

Abstract

Recent efforts to employ large language models (LLMs) as agents have demonstrated promising results in a wide range of multi-step agent tasks. However, existing agents lack an effective experience reuse approach to leverage historical completed tasks.

Show full abstract

In this paper, we propose a novel experience reuse framework MetaFlowLLM, which constructs a hierarchical experience tree from historically completed tasks. Each node in this experience tree is presented as a MetaFlow which contains static execution workflow and subtask required by agents to complete dynamically. Then, we propose a Hierarchical MetaFlow Merging algorithm to construct the hierarchical experience tree. When accomplishing a new task, MetaFlowLLM can first retrieve the most relevant MetaFlow node from the experience tree and then execute it accordingly. To effectively generate valid MetaFlows from historical data, we further propose a reinforcement learning pipeline to train the MetaFlowGen. Extensive experimental results on AppWorld and WorkBench demonstrate that integrating with MetaFlowLLM, existing agents (e.g., ReAct, Reflexion) can gain substantial performance improvement with reducing execution costs. Notably, MetaFlowLLM achieves an average success rate improvement of 32.3 % on AppWorld and 6.2 % on WorkBench, respectively. The code is available at https://github.com/RUCBM/MetaFlowLLM .

DOISemantic Scholar

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{fan2025generalizing,
  title  = {Generalizing Experience for Language Agents with Hierarchical MetaFlows},
  author = {Sheng-Da Fan and Xin Cong and Zhong Zhang and Yuepeng Fu and Ye-Sai Wu and Hao Wang and Xin-Yu Zhang and En-Rui Hu and Yan-Kai Lin},
  year   = {2025},
  doi    = {10.52202/085713-2149},
  url    = {https://doi.org/10.52202/085713-2149},
  journal = {Neural Information Processing Systems}
}

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/15bc6961c9c3e168b7ac11c991c9cbd3f91ad92a.svg)](https://codeofpaper.com/paper/15bc6961c9c3e168b7ac11c991c9cbd3f91ad92a)

Discussion