Source-linked AI summary
DynaFlow: Learning Free-Form Multi-Agent Orchestration
Ruhao Liu, Qi Li, Shizun Wang, Xinchao Wang
TL;DR
Fixed collaboration structures can be mismatched to diverse task requirements, while dependent stages need reliable access to upstream results. DynaFlow lets the Main Agent synthesize executable workflows and adapt decisions using execution feedback, training it with distilled and curated demonstrations while keeping sub-agents fixed. Across six benchmarks, it reports 88.08% overall accuracy in Forced mode, 10.90 percentage points above the strongest evaluated same-backbone baseline.
Problem
Many multi-agent systems rely on fixed collaboration structures despite task requirements varying between simple queries, parallel subtasks, and dependent stages.
Source: §1 · p. 1Method
DynaFlow trains only the Main Agent to choose direct answers, tools, or executable workflows, using execution outputs and traces for subsequent decisions and fixed sub-agents as executors.
Source: §1 · p. 2, §3.2 · p. 4Results
88.08% overall accuracy in Forced mode exceeds the strongest evaluated same-backbone baseline by 10.90 percentage points across six benchmarks.
Source: §1 · p. 2Takeaways & Limitations
Workflow analysis finds more explicit use, verification, and refinement of upstream outputs after training, identifying cross-stage information use as a key orchestration dimension.
Source: §1 · p. 2On scientific question answering, Self-Refine and AFlow remain ahead, and failures include losing or overriding correct intermediate evidence during verification and synthesis.
Source: §5.1 · p. 6
Abstract
from arXiv · showhide
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.
1 Introduction
DynaFlow addresses the limits of fixed collaboration structures by letting a task-solving agent decide when to collaborate and synthesize workflows. It trains only the Main Agent while keeping sub-agents fixed, and reports gains across six benchmarks.
1 Introduction
- Fixed collaboration structures can mismatch task needs, adding unnecessary communication, latency, and computation.Simple queries may need one agent, independent subtasks may benefit from parallel execution, and dependent stages need access to upstream results.Source: §1 · p. 1
- Prior workflow approaches retain construction or adaptation constraints, motivating free-form synthesis combined with repeated decisions informed by execution feedback.The cited examples include finite operator templates and coordination structures generated in a single decision without observing intermediate results.Source: §1 · pp. 1–2
- DynaFlow integrates executable workflow synthesis into the Main Agent’s action space, enabling task-specific coordination and follow-up decisions based on execution outputs and traces.The Main Agent can answer directly, use tools, or generate workflows defining sub-agent responsibilities, dependencies, and information transfer.Source: §1 · p. 2
- Training updates only the Main Agent using distilled demonstrations followed by a curated subset that filters unsupported premises, biased verification, and incomplete information transfer.Sub-agents remain fixed.Source: §1 · p. 2
- 88.08% overall accuracy in Forced mode exceeds the strongest evaluated same-backbone baseline by 10.90 percentage points across six benchmarks.The benchmarks span mathematical reasoning, scientific question answering, and multi-hop retrieval.Source: §1 · p. 2
2 Related Work
Prior work explores programmable agent interactions, workflow design, verification, and task-specific orchestration learning. DynaFlow combines free-form executable workflow actions with execution-informed decisions and demonstration selection focused on orchestration quality.
Agentic Workflows and Orchestration
- Workflow systems use programmable interactions, runtime coordination, graph- or code-based design, and verification-centered checks of intermediate decisions and evidence.Examples include AutoGen, Magentic-One, and Apodex 1.1 (Fourney et al., 2024; Apodex Team, 2026b).Source: §2 · p. 3
Learning Task-Specific Orchestration
- Task-specific orchestration work studies supervised training, reinforcement learning, execution-feedback revision, graph editing, and joint designer-executor training.The passage names MAS-GPT, FlowReasoner, Mas-Orchestra, MAS-Zero, DyFlow, FlowSteer, and MetaAgent-X.Source: §2 · p. 3
- DynaFlow places free-form executable workflow actions in the task-solving policy and trains only the Main Agent, selecting demonstrations for orchestration quality with fixed sub-agents.Its decisions combine collaboration and workflow construction with later actions based on execution feedback.Source: §2 · p. 3
3 DynaFlow
DynaFlow gives the Main Agent a free-form workflow action and uses execution feedback to guide later decisions. Its two-stage training distills workflow demonstrations, then selects examples for orchestration quality while keeping sub-agents fixed.
3.1 Free-Form Workflow Orchestration
- The Main Agent’s action space includes ordinary tool calls, final answers, and a workflow program paired with its invocation.The policy chooses among these actions based on the task and available history.Source: §3.1 · p. 3
- Workflow programs define sub-agent roles, stages, and dependencies, allowing independent calls to run in parallel and dependent calls to receive upstream outputs.The runtime returns program outputs and an execution trace under resource constraints.Source: §3.1 · p. 3
- After workflow execution, the Main Agent adds outputs and traces to its history, then answers or invokes further tools or workflows to verify, refine, or extend results.The next action is conditioned on the task instruction, question, and updated history.Source: §3.1 · p. 4
3.2 Learning the Orchestration Policy
- Training updates only the Main Agent in two stages: distilled first-turn reasoning and workflow actions, followed by a smaller-learning-rate continuation on a curated subset.The selection checks for injected premises, biased or constrained verification, and information-flow defects, with reported defects tied to program excerpts or launch arguments.Source: §3.2 · p. 4
4 Experimental Setup
The experiments test whether Main Agent training improves workflow-based problem solving and whether adaptive invocation preserves performance while reducing workflow use. Evaluation uses fixed sub-agents across three execution modes, six benchmarks, and shared-backbone baselines, measuring answer accuracy and workflow design quality.
Experimental questions and controls
- The study examines training effects on workflow problem solving and whether adaptive invocation preserves performance while reducing workflow use.Sub-agents remain fixed to isolate changes in the Main Agent.Source: §4 · pp. 4–5
Benchmarks and models
- Evaluation covers 688 questions across six benchmarks spanning competition and multilingual mathematics, scientific reasoning, and multi-hop question answering.The Main Agent and fixed workflow sub-agents use Qwen3.5-27B; HotpotQA uses web search.Source: §4 · p. 5
Execution modes
- Direct answers without tools, Dynamic choice between direct answering and workflow execution, and Forced workflow execution define the three evaluation modes.In workflow modes, the Main Agent coordinates and assesses delegated work; incomplete results can trigger revisions or further calls.Source: §4 · p. 5
Baselines and metrics
- Comparisons include CoT, CoT-SC, Self-Refine, AFlow, and Base plus web search, using Qwen3.5-27B across systems.AFlow uses released workflows transferred to evaluation tasks; tool-free HotpotQA comparisons are interpreted separately because they lack retrieval access.Source: §4 · pp. 5–6
- Answer accuracy counts runs without a valid final answer as incorrect, while Forced-mode workflows are assessed on four design criteria scored from 0 to 2.The criteria are task consistency, decomposition appropriateness, logical continuity, and information-flow correctness; Figure 4 reports judge scores for first workflows across benchmarks.Source: §4 · p. 6, Figure 4 · p. 6
5 Results and Analysis
DynaFlow improves benchmark performance through trained workflow orchestration, while its workflows show stronger information reuse and adapt collaboration to task needs. The analysis covers overall results, training effects, workflow quality, and adaptive invocation.
5.1 Overall Performance
- 88.08% overall accuracy in Forced mode and 87.94% in Dynamic mode; Forced execution solves all 90 AIME questions, with 100% accuracy across the 2024, 2025, and 2026 sets.On GPQA-Diamond, Forced execution reaches 84.85%, improving over Base, Forced by 7.07 points, while Self-Refine and AFlow remain ahead; on HotpotQA, Dynamic and Forced reach 84.50% and 83.50%, respectively.Source: §5.1 · p. 6
5.2 Effect of Training and Execution Mode
- After Stage 1, Forced execution reaches or exceeds Base, Direct on all six benchmarks and surpasses Direct within the same checkpoint by 8.73 points overall; Stage 2 further improves Forced and Dynamic performance.Base, Forced underperforms Base, Direct on every benchmark except HotpotQA, where workflows enable retrieval.Source: §5.2 · p. 7
5.3 Workflow Quality and Task-Specific Organization
- Hybrid workflows rise from 3.4% for Base to 85.6% after Stage 2, while programs passing upstream outputs with instructions for downstream use rise from 12.6% to 97.7%.Major information-flow defects decline from 1.9% in Stage 1 to 0.9% in Stage 2, while workflows specifying correction or refinement increase from 28.1% to 35.9%.Source: §5.3 · p. 7, Figure 5 · p. 7
- Solvers and verifiers account for over 90% of nodes on AIME and PolyMATH, while researchers account for 59.6% on HotpotQA.Verification accounts for 33.2–43.9% of nodes across tasks; sub-agent prompts specify objectives, relevant inputs, and use of upstream results.Source: §5.3 · p. 8, Figure 6 · p. 8
5.4 Adaptive Workflow Invocation
- DynaFlow’s Dynamic–Forced accuracy gap narrows to 0.14 percentage points; Dynamic mode answers 47.1% of questions directly while achieving 87.94% accuracy.Across all questions, Dynamic mode uses 2.44 sub-agents per question versus approximately 4.16 under Forced execution, a reduction of about 41%.Source: §5.4 · p. 8
6 Discussion
The discussion treats reliable information use as central to orchestration, alongside task decomposition. It connects training gains to better information transfer and refinement, while identifying independent verification and final-answer selection as areas for future work.
6 Discussion
- Stage 2 gains accompany better information transfer and more frequent refinement of intermediate results, consistent with screening for orchestration defects.The discussion also treats reliable information use alongside task decomposition as central to orchestration.Source: §6 · p. 8
- GPQA-Diamond failures illustrate that correct intermediate results can be lost or overridden during verification and final synthesis.The authors suggest future work on training sub-agents for reliable information transfer and independent verification, and on multi-turn supervision with disagreements and erroneous results.Source: §6 · p. 8
7 Conclusion
The conclusion presents DynaFlow as free-form executable workflow synthesis paired with two-stage training of the Main Agent and fixed sub-agents. Across six benchmarks, it reports the highest overall accuracy among evaluated methods and near-half direct answering in Dynamic mode; the appendices specify evaluation scope and workflow execution.
7 Conclusion
- Across six benchmarks, DynaFlow achieves the highest overall accuracy among evaluated methods, while Dynamic execution answers nearly half the questions directly with accuracy close to Forced execution.Workflow analysis characterizes changes in workflow structure and intermediate-result use after training.Source: §7 · pp. 8–9
A Experimental Setup Details
- The evaluation covers 688 questions across AIME 2024–2026, PolyMATH, GPQA-Diamond, and HotpotQA, spanning mathematics, science, and multi-hop retrieval.PolyMATH and HotpotQA samples use seed 42.Source: A Experimental Setup Details · p. 12
- The Agent uses Qwen3.5-27B, while workflow sub-agents use its Base checkpoint without orchestration training; only the Agent receives orchestration training.CoT, CoT-SC, Self-Refine, and AFlow use the same backbone.Source: A Experimental Setup Details · p. 12
B Workflow Runtime
- The Main Agent supplies JavaScript workflow programs that specify sub-agent instructions, dependencies, and intermediate-output handling; execution results and traces can inform later revisions or a final answer.The interface supports agent calls, parallel calls, pipelines, phase labels, and optional structured outputs.Source: B Workflow Runtime · p. 12
C Training Details
Training updates only the Main Agent, using distilled workflow demonstrations followed by a selected subset judged for orchestration quality. The appendix reports two training stages, their data sizes, and the fine-tuning configuration and compute budget.
C Training Details
- Stage 1 uses 2,257 first-turn demonstrations from HotpotQA and BrowseComp, supervising first-turn reasoning and action while masking instructions, questions, and tool definitions from loss.All sub-agents remain fixed.Source: C Training Details · p. 12
- Stage 2 continues from the Stage 1 checkpoint on 712 selected complete workflow demonstrations, and both stages train for two epochs without a separate validation split.The Stage 2 learning rate is smaller; the selected demonstrations comprise 449 HotpotQA and 263 BrowseComp examples.Source: C Training Details · p. 12
- Fine-tuning uses 4-bit NF4 QLoRA and BF16 computation on two NVIDIA H100 80GB GPUs, totaling about 69 GPU-hours across both stages.This estimate excludes teacher-trajectory generation, evaluation, and LLM-based judging.Source: C Training Details · p. 12
- Only the Main Agent is updated; sub-agents remain fixed, and the training-configuration table distinguishes shared values from stage-specific settings.The configured maximum sequence length is an upper limit.Source: Table 3 · p. 12, C Training Details · p. 12
D Evaluation Protocol
The evaluation protocol specifies decoding and answer scoring, characterizes workflow structure and sub-agent roles, and evaluates workflow quality with a judge. The appendix also describes screening demonstrations for orchestration defects and summarizes the evaluation prompts and workflow interface.
D Evaluation Protocol
- Answer scoring uses the Main Agent’s final answer, counts runs without a valid final answer as incorrect, and applies task-specific matching rules for AIME, GPQA-Diamond, PolyMATH, and HotpotQA.Approximate decimals are not accepted as exact answers when the task specifies no numerical precision.Source: D Evaluation Protocol · p. 13
- Workflow programs are scored for task consistency, decomposition appropriateness, logical continuity, and information-flow correctness on a 0–2 scale, with inapplicable dependency ratings mapped to 2.Insufficient-evidence ratings are excluded; the analysis compares structural-property distributions across training stages.Source: D Evaluation Protocol · p. 13
- Figure 6 groups executed sub-agent roles into Verifier, Aggregator, Interpreter, Researcher, Solver, or Other; role proportions pool results across AIME benchmarks.Keyword matches determine categories, with phase names as fallback and a specified priority when multiple categories match.Source: D Evaluation Protocol · p. 13
E Orchestration Quality Selection
- The selection judge screens for unsupported answer-relevant premises, verification defects, and information-flow defects, then excerpts are checked against the workflow text.From 2,254 workflow-containing demonstrations, 712 complete first-turn examples are retained for Stage 2.Source: E Orchestration Quality Selection · p. 13
F Evaluation Prompts and Workflow Interface
- Figure 7 summarizes the Direct, Dynamic, and Forced prompts, answer format, and Workflow tool interface, which specify invocation conditions, delegation, and returned-result use.Repeated formatting instructions are omitted for brevity.Source: F Evaluation Prompts and Workflow… · p. 13
G Full Results
The supplied materials describe the evaluation interface and the scope of the reported results, but do not include the per-benchmark accuracy values.
G Full Results
- Forced-mode instructions require invoking Workflow before substantive problem solving, including when the task seems answerable directly.Research, calculations, code execution, reasoning, and verification must occur within Workflow.Source: G Full Results · p. 14
- Figure 7 presents evaluation-prompt excerpts for three execution modes, a shared answer format, and the Workflow tool.The supplied passage does not provide the prompt contents.Source: Figure 7 · p. 14
- Table 6 covers per-benchmark accuracy by Main Agent and execution mode, while Table 5 defines six dimensions for characterizing generated workflows.The supplied passages give table scope but not their cell values or dimension names.Source: Table 6 · p. 15, Table 5 · p. 15
H Case Studies of Workflow Changes
The case studies illustrate task-specific workflows linking computations through explicit information transfer, verification, and feedback-driven decisions; the related-work discussion positions DynaFlow as adaptive orchestration with fixed sub-agents.
H Case Studies of Workflow Changes
- 62 was obtained by three complementary solvers and a verifier, while Base’s single solver returned 59 after an arithmetic error.Enumeration, dynamic programming, and inclusion–exclusion outputs were passed to the verifier for comparison and independent recomputation.Source: H Case Studies of Workflow Changes · p. 16, Figure 8 · p. 17
- DynaFlow’s GPQA-Diamond workflow passes research evidence and verification objections to the decision agent, unlike Base’s unconnected sequential analyses.Checks challenged the initial candidate products for both reactions.Source: H Case Studies of Workflow Changes · p. 16, Figure 9 · p. 17
- For HotpotQA, DynaFlow links entity identification to year retrieval by passing ranked candidate names, quotations, and sources to resolution agents.Three search routes identify candidates, which are deduplicated and ranked before candidate-specific resolution and subsequent checks.Source: H Case Studies of Workflow Changes · p. 16, Figure 10 · p. 18
- For AIME 2025 geometry, optimizer outputs inform a fitted candidate, and independent audit findings determine whether a repair step runs.The displayed DynaFlow workflow connects geometric construction, parallel optimization, expression fitting, and audits.Source: H Case Studies of Workflow Changes · p. 16, Figure 11 · p. 19
I Extended Related Work
- DynaFlow combines task-specific workflow synthesis and feedback-driven decisions, updating only the Main Agent while keeping sub-agents fixed.The discussion emphasizes selective collaboration, explicit dependencies, and training demonstrations filtered for orchestration quality.Source: I Extended Related Work · p. 20