FlowEvo: Self-Evolving Agents through the Co-Evolution of Workflows and Executable Skills
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
- 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
- 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
- Each skill's real-world usefulness is tracked continuously, and skills that turn out to hurt performance (negative transfer) are automatically suppressed
- 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
- Across 10 base models ranging from 7B to 671B parameters, FlowEvo beat the prior method ExpeL in 49 out of 50 model-dataset comparisons

| Route | Role of retrieved skill | Executes code | Indirect effect |
|---|---|---|---|
| Dynamic generation | No retrieved skill is used. | ✗ | ✗ |
| Direct skill execution | A retrieved skill is called as an executable subroutine before verification. | ✓ | ✗ |
| Skill-conditioned generation | Retrieved skills are supplied only as structured context for planning and generation. | ✗ | ✓ |
| ALFWorld | HumanEval | GSM8K | ||||
|---|---|---|---|---|---|---|
| Method | SR (%) | Tokens | pass@1 (%) | Tokens | Solve (%) | Tokens |
| Reflexion | 52.2 | 31,900 | 92.7 | 890 | 96.8 | 555 |
| ExpeL | 46.3 | 32,958 | 89.0 | 883 | 92.1 | 552 |
| ADAS | 53.0 | 29,671 | 82.4 | 3,776 | 90.8 | 2,820 |
| AFLOW | 59.2 | 30,137 | 94.7 | 3,826 | 93.5 | 2,494 |
| FlowEvo | 82.8 | 12,267 | 95.1 | 880 | 97.1 | 541 |
| Constant | Value |
|---|---|
| Retrieval | |
| top_k | 3 |
| retrieval_threshold | 5.0 |
| Historical positive-transfer cap | 2.5 |
| Negative-transfer risk cap | 3.0 |
| Routing | |
| _COMPATIBILITY_DIRECT_THRESHOLD | 0.55 |
| Direct-execute compat gate | ≥1.5 |
| _CODE_EXCERPT_THRESHOLD | 4.6 |
| Max seed context skills | 2 |
| Admission | |
| banned_imports | {os, subprocess, socket, requests, pathlib} |
| banned_calls | {eval, exec, compile, __import__, open} |
| prune_audit_fail_threshold | 2 |
| Curation (ALFWorld) | |
| _CONTRASTIVE_MIN_GUIDED | 5 |
| _CONTRASTIVE_MIN_UNGUIDED | 3 |
| _CONTRASTIVE_HARM_THRESHOLD | −0.1 |
| _AUDIT_MIN_USES | 3 |
| _AUDIT_UTILITY_THRESHOLD | 0.5 |
| _AUDIT_INACTIVITY_LIMIT | 50 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 reasoning | temp=0.0, max=300 |
| Execution | |
| ALFWorld max_steps | 50 |
| Sandbox timeout (code/math) | 10 s |
| Task type | Status | Uses | Success | Fail | Utility |
|---|---|---|---|---|---|
| pick_and_place_simple | active | 23 | 23 | 0 | 1.00 |
| pick_clean_then_place_in_recep | active | 28 | 28 | 0 | 1.00 |
| pick_heat_then_place_in_recep | active | 21 | 21 | 0 | 1.00 |
| pick_cool_then_place_in_recep | active | 20 | 18 | 2 | 0.90 |
| look_at_obj_in_light | active | 15 | 13 | 2 | 0.87 |
| pick_two_obj_and_place | suppressed | 10 | 1 | 9 | 0.10 |
| Task type | n | Direct | Cond. | Dyn. | Direct SR | Overall SR |
|---|---|---|---|---|---|---|
| look_at_obj_in_light | 18 | 0 | 12 | 6 | — | 14/18 (78%) |
| pick_and_place_simple | 24 | 14 | 9 | 1 | 14/14 | 24/24 (100%) |
| pick_clean_then_place_in_recep | 31 | 22 | 6 | 3 | 22/22 | 29/31 (94%) |
| pick_cool_then_place_in_recep | 21 | 12 | 8 | 1 | 12/12 | 19/21 (90%) |
| pick_heat_then_place_in_recep | 23 | 19 | 2 | 2 | 19/19 | 22/23 (96%) |
| pick_two_obj_and_place | 17 | 0 | 10 | 7 | — | 3/17 (18%) |
| Total | 134 | 67 | 47 | 20 | 67/67 | 111/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.
Read on arXivLatest papers
- Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language ModelsA smart-contract vulnerability detector that keeps learning new bug types without forgetting old ones, then folds everything into one model
- Asymmetric Attention Heads: Structured Head-Wise Context Allocation for Transformer AttentionTesting whether every attention head in a Transformer really needs to see the same amount of context
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI assistants would rather double-check facts than ask you a question, even when asking is the right call
- Are LLMs becoming similarly creative? Evidence from three years of modelsNewer AI chatbots are giving increasingly similar answers to each other, three years of data show
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy CorrectionWhen text input is missing or broken, this AI doesn't guess once and move on—it revises its guess step by step to read emotions more reliably
- A knowledge-guided agentic framework for mitigating patient-context ambiguity in health queriesGetting AI to ask the right follow-up questions before answering vague health queries
- Specification-delta-driven data governance: an empirical study of the {\guillemotleft}spec-delta{\guillemotright} as the unit of change in lakehouse data platformsTreating data-platform changes like reviewable spec snippets instead of code diffs: an experiment design paper
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM ServingMaking sparse attention fast enough and accurate enough for real LLM serving, not just papers
Latest from METAL LAB
Figures: Zeyu Ren et al., arXiv:2607.21596, arxiv-nonexclusive