Manuscript Offprint

arXiv:2610.01026

It Takes Workflows to Evolve Better Workflows

Xuehang Guo, Haoyu Wang, Haifeng Chen, Yangyi Chen, Zhenhailong Wang, Qingyun Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Tackling complex real-world tasks can exceed the capabilities of a single large language model (LLM), motivating the use of multi-agent workflows that coordinate specialized agents to work together on these tasks. Recent methods train LLMs to construct better workflows from execution outcomes, but they optimize only the workflow generator, while the other agents that build or execute each workflow remain fixed even though every outcome depends on all of them. However, extending training beyond the generator is challenging: the agents are coupled, and a workflow's outcome is a single sparse score that cannot tell which agent causes a failure. We propose FLOWRIGHT, which leverages the workflow as a harness to optimize workflows. By introducing a hierarchical, structure-aware reward paradigm, FLOWRIGHT enables one role to self-evolve and two or more roles to co-evolve, with no additional models, labels, or executions. Considering the limitation that workflows are commonly trained and evaluated on data that a single agent can already handle, we further propose DATAWRIGHT, an adaptive data hardening approach that converts existing datasets into workflow-level tasks with increased difficulty. Across document, slide, chart, code, math, and finance tasks, small open models trained with FLOWRIGHT achieve improved performance by up to +7.41%, with co-evolving (+5.03%) more roles gaining more than optimizing one of them alone (+2.83%). Our project page: https://xhguo7.github.io/FloWright/.

1 INTRODUCTION

Large language models (LLMs) are increasingly capable of leveraging tools and specialized skills to solve tasks (Zhang et al., 2025e; Qian et al., 2025; Wang et al., 2025c; Zhang et al., 2026a). However, tackling complex real-world problems can go beyond the capability of a single LLM, as it demands gathering evidence across heterogeneous inputs, reasoning over long contexts and diverse sources, and accumulating intermediate results over many steps (Yu et al., 2025b; Zhu et al., 2025). To address such tasks, LLMs construct multi-agent workflows that break complex tasks into subtasks and coordinate specialized agents (Zhang et al., 2025d; Hu et al., 2025b; Niu et al., 2025).

Yet constructing an effective workflow for a complex task remains challenging, and many multi-agent frameworks still rely on substantial manual design (Jin et al., 2026; Li et al., 2025; Agashe et al., 2025). To reduce this manual effort, recent works optimize LLMs to construct better workflows by training them against the outcomes of executing those workflows (Nie et al., 2025; Nielsen et al., 2026). However, these methods typically optimize a single workflow generator, while the agents that execute the workflow, and any other agents that help build it, remain fixed (§A.1). Since the outcome of a workflow depends jointly on every agent that builds or executes it, training only the generator leaves other agents shaping every outcome without ever learning from it, significantly limiting how much the workflow as a whole can improve.

Extending training beyond the generator introduces two additional challenges. First, agents in a workflow are interdependent: one agent's output can become another's input, and overall performance depends on their joint behavior. Existing multi-agent training either trains each agent separately (Guo et al., 2026; Motwani et al., 2025) or co-trains agents with distinct roles only within a fixed pairing or a hand-designed system (Park et al., 2025; Zhao et al., 2026; Huang et al., 2026; Wan et al., 2025) (§A.2). Training agents separately thus ignores how each agent's behavior shapes what the others learn, while co-training remains confined to a single role or a predefined agent structure rather than the workflows constructed for each task. Second, the outcome of a workflow is usually a single score for the whole workflow. It is sparse whenever the workflow falls short, and cannot tell which agent

  • Equal co-mentorship.

Correspondence: Xuehang Guo xguo15@wm.edu, Zhenhailong Wang wangz3@illinois.edu, Qingyun Wang qwang16@wm.edu causes a failure. Methods that do attribute failures to specific agents or steps, however, rely heavily on learned critics or reward models, LLM judges, human annotation, or repeated executions (Liu et al., 2025; Zhang et al., 2025b; Ma et al., 2026) (§A.3). Such attribution adds costly models, labels, or executions beyond the workflow run itself, and it can still misattribute where a failure originates.

Beyond how workflows are built and trained, the data used to optimize and evaluate them pose a further challenge. Multi-agent workflows are commonly trained and evaluated on datasets such as single-question math, function-level coding, and short question answering, which a single agent can already handle (Zhang et al., 2026b) (§A.4). On such data, re-evaluations find that the gains of multi-agent systems over a strong single agent are often small or absent (Cemri et al., 2025; Choi et al., 2025; Zhu et al., 2026) (§C). These datasets can therefore neither reveal nor optimize what a workflow adds beyond a single agent.

Motivated by these limitations, we propose FLOWRIGHT (§3), which leverages the workflow as a harness (§2) to optimize any role (§3.5). Besides letting each role self-evolve, FLOWRIGHT co-evolves multiple roles inside the harness (§3.4), and stages the grade into a hierarchical, structure-aware reward (§3.3) with role-level credit localization (§3.2). Beyond workflow construction and optimization, FLOWRIGHT introduces a data adaptation algorithm (Alg. 1) that hardens existing datasets for workflow-level training and evaluation (§D). Our contributions are as follows:

① Shared harness for every role, at train and test time. We define a shared workflow harness whose signal serves three purposes (§2.1): the evaluation metric (§D.4), the optimization signal for training any role (Fig. 2), and the meta distillation objective at test time (§3.5).

② Structure-aware credit at no extra cost. We design a reward hierarchy that turns the sparse signal of a workflow into dense, role-level feedback (§3.3), with credit read from the execution trace that the harness already records, requiring no additional models, labels, or executions (§3.2).

③ Workflow-level data hardening. We propose DATAWRIGHT, a data adaptation approach whose three hardening strategies convert datasets a single agent can already handle into workflow-level tasks with increased difficulty levels, supporting both training and evaluation (§D).

④ Four evolution modes that generalize. FLOWRIGHT enables four evolution modes (§3.4): (a) single-role self-evolution, (b) agent-skill co-evolution, (c) upstream-downstream co-evolution, and (d) multi-agent co-evolution. Co-evolving more roles gains more than optimizing one alone, achieving +5.03% overall against +2.83% for a single role (§5.1). In addition, gains are generalizable across roles, backbones, RL algorithms, workflow topologies, and pools (§5.2).

References (95)