arXiv(opens in a new tab)cs.MAOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.34467

DynaFlow: Learning Free-Form Multi-Agent Orchestration

Ruhao Liu, Qi Li, Shizun Wang, Xinchao Wang

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

Abstract

Multi-agent systems often rely on predefined collaboration structures, limiting their ability to adapt to diverse task requirements. We introduce DynaFlow, a framework that integrates free-form executable workflow synthesis into the action space of the main agent. The agent decides when collaboration is needed and generates task-specific programs that coordinate sub-agents through sequential or parallel execution, structured information exchange, and verification. Execution results and traces inform subsequent actions, enabling the agent to adapt collaboration as reasoning progresses. We train only the main agent through supervised fine-tuning on distilled trajectories, followed by refinement on examples filtered for unsupported premises, biased verification, and information-flow defects. All sub-agents remain fixed, separating orchestration learning from executor capability improvement. Across six benchmarks spanning mathematical reasoning, scientific question answering, and multihop retrieval, DynaFlow achieves 88.08% overall accuracy in Forced mode, outperforming the strongest evaluated baseline by 10.90 percentage points with the same Qwen3.5-27B backbone. Workflow analysis finds more explicit use, verification, and refinement of upstream outputs after training, highlighting cross-stage information flow as a key dimension of multi-agent orchestration.

1 Introduction

The effectiveness of multi-agent systems (MAS) built on large language models (LLMs) depends on how collaboration is organized. Many systems rely on fixed collaboration structures with pre-designed agent roles, communication patterns, or workflow components (Li et al., 2023; Wu et al., 2024; Hong et al., 2024; Dat et al., 2026). Yet coordination

Figure

Figure 1: Overall accuracy versus collaboration size. Accuracy versus the mean number of agent roles per question on 688 questions (Qwen3.5-27B). In Forced mode, DynaFlow improves accuracy from Base's 75.9% to 88.1%. Dynamic achieves 87.9% with 3.44 agent roles per question on average, while answering 47% of questions without workflows.

requirements vary across tasks: simple queries may need only one agent, independent subtasks can benefit from parallel execution, and dependent stages require reliable access to upstream results. Applying a fixed collaboration structure across these settings can introduce unnecessary communication, latency, and computation (Wang et al., 2026; Li and Wang, 2026; Yin et al., 2026). We argue that scalable MAS require a stronger capability, which we refer to as Free Orchestration: the ability to decide when collaboration is useful and construct task-specific workflows during problem solving.

Automated workflow design has begun to address this rigidity. Existing approaches search for effective workflows using execution feedback (Zhang et al., 2025c), or generate and adapt query-specific agent systems during inference (Ye et al., 2025; Gao et al., 2025; Tieu et al., 2026; Wang et al., 2025b; Ke et al., 2025, 2026). However, these advances retain constraints on workflow construction and adaptation. DyFlow revises plans using execution feedback but constructs them from a finite set of operator templates (Wang et al., 2025b).

†^{\dagger}Equal contribution.

‡^{\ddagger}Project Lead.

∗^{*}Corresponding Author.

Figure

Figure 2: Overview of DynaFlow. (1) Two-stage SFT trains only the Main Agent on first-turn reasoning r and workflow action a1a_{1}, using distilled demonstrations followed by a curated subset. (2) It chooses to answer directly, call a tool, or generate a JavaScript workflow. (3) Frozen sub-agents collaborate within the workflow according to the Main Agent's program. (4) Outputs and execution traces update the history for subsequent decisions.

MAS-Orchestra formulates orchestration through function calls, yet generates the complete coordination structure in a single decision without observing intermediate execution results (Ke et al., 2026). These limitations motivate combining free-form workflow synthesis with repeated orchestration decisions informed by execution feedback. We therefore investigate executable workflow synthesis as a native action of the task-solving agent, alongside ordinary tool use. The same agent decides (i) when to collaborate, (ii) constructs task-specific programs, and (iii) uses their returned outputs and traces to determine how to proceed.

To this end, we introduce DynaFlow (Figure 2), a framework that integrates free-form executable workflow synthesis into the task-solving agent's action space. We refer to this agent as the main agent, which coordinates sub-agents responsible for executing delegated subtasks. The Main Agent can answer directly, use ordinary tools, or generate a task-specific workflow program. Through a minimal execution interface, it defines sub-agent responsibilities, sequential or parallel dependencies, and how intermediate outputs are passed, aggregated, and verified directly in code. A budget-constrained runtime executes the program and returns its outputs and execution trace. The Main Agent then uses this feedback to guide subsequent actions, including synthesizing follow-up workflows that adapt collaboration to the observed results.

We decouple orchestration learning from sub-agent training by updating only the Main Agent on distilled workflow demonstrations while keeping all sub-agents fixed. This focuses learning on coordinating existing capabilities and allows pretrained models to be reused as executors without retraining. The training process begins with distilled workflow demonstrations. Since answer correctness alone does not guarantee reliable coordination, we then refine the policy on a curated subset that excludes demonstrations flagged for unsupported premises, biased verification, or incomplete information transfer. This training process makes orchestration quality an explicit criterion for selecting demonstrations, guiding the Main Agent toward more reliable task coordination and information use.

Across six benchmarks spanning mathematical reasoning, scientific question answering, and multihop retrieval, DynaFlow achieves 88.08% overall accuracy in Forced mode, exceeding the strongest evaluated baseline using the same backbone by 10.90 percentage points. In Dynamic mode, it maintains accuracy close to Forced execution while answering 47.1% of questions without invoking a workflow. Further analysis finds that training leads to more explicit use, verification, and refinement of upstream outputs. Together, these results support learning both how to organize collaboration and when to invoke it, and identify cross-stage information use as a key dimension of effective orchestration.

References (38)