One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

FlowEvo: Self-Evolving Agents through the Co-Evolution of Workflows and Executable Skills

arXiv:2607.215962026-08-19

An AI agent turns its own past successful task-solving routines into reusable skills, getting better over time without any training

LLM agents typically build a fresh procedure (workflow) for every task, and even successful ones are usually thrown away afterward. FlowEvo instead compiles successful workflows into executable skills, stores them in a persistent bank, and later either runs a matching skill directly or feeds it in as guidance while building a new workflow. Using only GPT-4o-mini with no parameter updates, it reaches 85.6% on ALFWorld, 26.4 points above the strongest baseline, while using about one third the tokens.

What they did

  1. When the agent solves a task successfully, FlowEvo automatically compiles the workflow into a reusable skill (a callable piece of code plus usage guidance) and stores it in a skill bank
  2. For a new task, a matching stored skill can either be executed directly or supplied only as contextual guidance while a new workflow is generated
  3. Each skill's real-world usefulness is tracked continuously, and skills that turn out to hurt performance (negative transfer) are automatically suppressed
  4. With a single shared GPT-4o-mini backbone, FlowEvo scored highest among 8 baseline methods on the full standard test splits of ALFWorld, HumanEval, MBPP, GSM8K, and MATH-500
  5. Across 10 base models ranging from 7B to 671B parameters, FlowEvo beat the prior method ExpeL in 49 out of 50 model-dataset comparisons
Figure 1: Overview of FlowEvo. Successful workflows are compiled into executable skills and stored in a persistent bank. Retrieved skills can either be executed directly or supplied as structured context for subsequent workflow generation.
Figure 1: Overview of FlowEvo. Successful workflows are compiled into executable skills and stored in a persistent bank. Retrieved skills can either be executed directly or supplied as structured context for subsequent workflow generation.
Table 1: Routing modes in FlowEvo. The distinction between direct execution and skill-conditioned generation is central to the mechanism analysis.
RouteRole of retrieved skillExecutes codeIndirect effect
Dynamic generationNo retrieved skill is used.
Direct skill executionA retrieved skill is called as an executable subroutine before verification.
Skill-conditioned generationRetrieved skills are supplied only as structured context for planning and generation.
Figure 2: Skill accumulation dynamics on ALFWorld. (a) FlowEvo’s token cost drops sharply once the first compiled skill becomes available around episode 10 (dashed line) and remains substantially below ReAct for the rest of the run. (b) Cumulative direct-reuse count (green) grows nearly linearly to 101/134, and the reuse hit rate (orange) stabilizes around 75%.
Figure 2: Skill accumulation dynamics on ALFWorld. (a) FlowEvo’s token cost drops sharply once the first compiled skill becomes available around episode 10 (dashed line) and remains substantially below ReAct for the rest of the run. (b) Cumulative direct-reuse count (green) grows nearly linearly to 101/134, and the reuse hit rate (orange) stabilizes around 75%.
Table 2: Main results across three benchmarks (GPT-4o-mini). Bold = best accuracy or lowest tokens; underline = second best.
ALFWorldHumanEvalGSM8K
MethodSR (%)Tokenspass@1 (%)TokensSolve (%)Tokens
Reflexion52.231,90092.789096.8555
ExpeL46.332,95889.088392.1552
ADAS53.029,67182.43,77690.82,820
AFLOW59.230,13794.73,82693.52,494
FlowEvo82.812,26795.188097.1541
Figure 3: Per-task-type success rate on ALFWorld (GPT-4o-mini; n per type varies). FlowEvo improves over ReAct on all five displayed task types. The magnitude of improvement tracks how often the compiled skill completed the task through direct execution alone without fallback to skill-conditioned or dynamic generation. The pick_two task type is omitted because its compiled skill was suppressed by skill curation as a case of negative transfer (see Section 4.3).
Figure 3: Per-task-type success rate on ALFWorld (GPT-4o-mini; n per type varies). FlowEvo improves over ReAct on all five displayed task types. The magnitude of improvement tracks how often the compiled skill completed the task through direct execution alone without fallback to skill-conditioned or dynamic generation. The pick_two task type is omitted because its compiled skill was suppressed by skill curation as a case of negative transfer (see Section 4.3).
Table 3: Core decision thresholds used in FlowEvo. All values are defaults; no per-benchmark tuning was performed for the reported results.
ConstantValue
Retrieval
top_k3
retrieval_threshold5.0
Historical positive-transfer cap2.5
Negative-transfer risk cap3.0
Routing
_COMPATIBILITY_DIRECT_THRESHOLD0.55
Direct-execute compat gate≥1.5
_CODE_EXCERPT_THRESHOLD4.6
Max seed context skills2
Admission
banned_imports{os, subprocess, socket, requests, pathlib}
banned_calls{eval, exec, compile, __import__, open}
prune_audit_fail_threshold2
Curation (ALFWorld)
_CONTRASTIVE_MIN_GUIDED5
_CONTRASTIVE_MIN_UNGUIDED3
_CONTRASTIVE_HARM_THRESHOLD−0.1
_AUDIT_MIN_USES3
_AUDIT_UTILITY_THRESHOLD0.5
_AUDIT_INACTIVITY_LIMIT50 episodes
Adaptive escalation
Level 1 (greedy)temp=0.0, max=2048
Level 2 (mini-ensemble, 2 candidates)temp=0.5, max=2048
Level 3 (retry, hot)temp=0.7, max=2048
Level 4 (retry, cool)temp=0.2, max=2048
Reflexion reasoningtemp=0.0, max=300
Execution
ALFWorld max_steps50
Sandbox timeout (code/math)10 s
Table 4: Active skills after 134 ALFWorld episodes. Uses counts episodes in which the skill was retrieved above retrieval_threshold and thus participated in routing (whether the router eventually selected direct execution or skill-conditioned generation, or downgraded to dynamic). Success / Fail are the outcomes of those retrieval-matched episodes; Utility = Success / Uses. Entries are cumulative over the run. For five of the six task types, Uses equals Direct+Cond from Table 5; look_at_obj_in_light has 3 additional retrieval matches that were routing-downgraded to pure_dynamic (see Section 4.4: "the retrieved skill matched on 15 of 18 episodes").
Task typeStatusUsesSuccessFailUtility
pick_and_place_simpleactive232301.00
pick_clean_then_place_in_recepactive282801.00
pick_heat_then_place_in_recepactive212101.00
pick_cool_then_place_in_recepactive201820.90
look_at_obj_in_lightactive151320.87
pick_two_obj_and_placesuppressed10190.10
Table 5: Internal routing modes by task type on ALFWorld. “Direct” = pure direct_skill; “Cond.” = direct_then_* plus exemplar_guided; “Dyn.” = pure_dynamic. “Direct SR” is the success rate among pure direct-execute episodes. “Overall SR” is the pass rate on all episodes of the task type.
Task typenDirectCond.Dyn.Direct SROverall SR
look_at_obj_in_light18012614/18 (78%)
pick_and_place_simple24149114/1424/24 (100%)
pick_clean_then_place_in_recep31226322/2229/31 (94%)
pick_cool_then_place_in_recep21128112/1219/21 (90%)
pick_heat_then_place_in_recep23192219/1922/23 (96%)
pick_two_obj_and_place1701073/17 (18%)
Total13467472067/67111/134 (83%)

Why it matters

It shows agents can accumulate useful experience purely at inference time, improving both accuracy and cost efficiency without retraining the underlying model. That matters for real-world settings with repetitive tasks, such as household robot control or automated code/math problem solving, where cutting inference cost while raising accuracy has direct practical value.

Terms in this paper

  • workflow · the reasoning, tool-use, and code-execution procedure an agent constructs on the fly to solve a task
  • skill bank · a persistent store of executable procedures compiled from previously successful workflows
  • negative transfer · when reusing a stored skill actually lowers success rate compared to not using it
  • skill-conditioned generation · using a stored skill only as reference context to guide building a new workflow, rather than running it directly
  • training-free · improving agent behavior without updating the underlying model's parameters

Original abstract (English)

Large language model agents can adapt to complex tasks by constructing workflows at inference time, but procedures discovered in one episode are usually discarded after execution. Existing skill libraries provide reusable executable routines, but are typically assembled offline and do not grow from the agent's own workflows. We introduce FlowEvo, a training-free framework in which workflows and skills co-evolve at inference time. FlowEvo compiles successful workflows into callable skills, stores them in a persistent bank, and uses retrieved skills either through direct execution or as context for constructing new workflows. It also tracks each skill's downstream utility and suppresses skills that cause negative transfer. Using a shared GPT-4o-mini backbone, FlowEvo achieves the highest accuracy among 8 baselines on the full standard splits of ALFWorld, HumanEval, MBPP, GSM8K, and MATH-500. On ALFWorld, it reaches 85.6%, 26.4 points above the strongest baseline, while using roughly one third as many tokens. Across 10 base models spanning 7B to 671B parameters, FlowEvo outperforms ExpeL in 49 of 50 model-dataset comparisons. Code is available at https://github.com/DEFENSE-SEU/FlowEvo.

Authors · Zeyu Ren

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Zeyu Ren et al., arXiv:2607.21596, arxiv-nonexclusive