DynaFlow: Learning Free-Form Multi-Agent Orchestration
Organizations: National University of Singapore
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 multi-hop 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.
Figures & tables
| Method | AIME24 | AIME25 | AIME26 | PolyMATH | GPQA-D | HotpotQA | Overall |
|---|---|---|---|---|---|---|---|
| Single-agent baselines | |||||||
| CoT | 96.67 | 93.33 | 86.67 | 83.00 | 85.35 | 46.50 | 74.27 |
| CoT-SC | 90.00 | 93.33 | 96.67 | 84.50 | 85.86 | 50.50 | 76.16 |
| Self-Refine | 96.67 | 93.33 | 93.33 | 87.50 | 88.38 | 48.00 | 77.18 |
| Automated multi-agent baseline | |||||||
| AFlow | 93.33 | 96.67 | 100.00 | 86.00 | 87.37 | 47.00 | 76.45 |
| Main Agent | Direct | Dynamic | Forced |
|---|---|---|---|
| Base | 71.51 | 65.12 | 75.87 |
| Stage 1 | 76.74 | 84.45 | 85.47 |
| DynaFlow (Stage 2) | 77.18 | 87.94 | 88.08 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Stage 1 | Stage 2 |
|---|---|---|
| Training examples | 2,257 | 712 |
| Learning rate | ||
| Epochs | 2 | 2 |
| LoRA rank / / dropout | 16 / 32 / 0 | |
| Optimizer | Fused AdamW | |
| Schedule / warmup ratio | Cosine / 0.05 | |
| Parameter | Value |
|---|---|
| Main Agent | |
| Context length | 131,072 |
| Max output tokens | 81,920 |
| Temperature / top- / top- | 1.0 / 0.95 / 20 |
| Presence penalty / seed | 1.5 / 42 |
| Sub-agents | |
| Dimension | Categories and definitions |
|---|---|
| Execution structure | Code only : no agent reasoning node, only code or tools; Single agent : exactly one agent reasoning node; Serial : multiple agents operate mainly in sequence, with later stages depending on earlier ones; Parallel : agents operate mainly independently in parallel, without substantial sequential dependencies; Hybrid : parallel branches and sequential agent dependencies are meaningfully combined. |
| Role specialization | None : fewer than two agents; Homogeneous : agents mainly perform the same role or type of attempt; Complementary : agents differ in roles, perspectives, subtasks, or methods; Mixed : homogeneous attempts and complementary roles coexist. |
| Dependency pattern | None : no agent depends on another agent’s output; Chain : outputs mainly form a sequential chain; Fan-out : one upstream result feeds multiple downstream agents; Fan-in : one downstream agent combines multiple upstream results; Multi-stage : multiple dependency forms or sequential stages are combined. |
| Output reuse | None : no upstream output is passed downstream; Passed : an upstream output is supplied, but its meaningful use is not explicitly required; Consumed : the actual upstream output is supplied and the downstream instruction explicitly requires using, analyzing, comparing, refining, critiquing, or transforming it. |
| Aggregation strategy | None : no result aggregation; Concatenation : results are collected without substantive comparison or synthesis; Selection : one result or candidate is selected; Voting : results are combined by voting or majority agreement; Comparison : outputs are explicitly compared; Synthesis : outputs are integrated into a new answer or representation; Correction/refinement : an upstream result is reviewed and may be revised; Mixed : multiple substantive aggregation mechanisms are used. |
| Agent count | Number of distinct agent reasoning nodes explicitly instantiated in the program, excluding deterministic code, formatting, and simple tool calls. Counts are displayed as 0, 1, 2, 3, 4, and 5+ in Figure 5 . |
| Main Agent | Mode | AIME24 | AIME25 | AIME26 | PolyMATH | GPQA-D | HotpotQA | Overall |
|---|---|---|---|---|---|---|---|---|
| Base | Direct | 93.33 | 93.33 | 93.33 | 74.00 | 83.33 | 47.50 | 71.51 |
| Dynamic | 63.33 | 63.33 | 73.33 | 64.00 | 77.78 | 53.00 | 65.12 | |
| Forced | 76.67 | 70.00 | 70.00 | 70.00 | 77.78 | 81.50 | 75.87 | |
| Stage 1 | Direct | 93.33 | 96.67 | 90.00 | 87.50 | 87.88 | 47.50 | 76.74 |
| Dynamic | 96.67 | 100.00 | 93.33 | 88.50 | 82.83 | 76.50 | 84.45 | |
| Forced | 96.67 | 96.67 | 100.00 | 84.50 | 84.34 | 82.00 | 85.47 |
Multi-Agent Orchestration
Multi-agent orchestration coordinates specialized AI agents, tools, and workflows to solve complex tasks efficiently and reliably.
See all 206 papers