Multi-agent system adapts collaboration by generating task workflows

DynaFlow: Learning Free-Form Multi-Agent Orchestration

Multiagent Systems

Summary

Many systems with multiple agents follow fixed ways to work together, which can limit how well they handle different tasks. The authors created DynaFlow, which lets a main agent figure out when and how to collaborate by creating step-by-step programs for smaller agents to follow. This main agent learns to improve its teamwork by looking at how past actions went and adjusting future steps. They tested this method on several complex tasks like math problems and question answering, and it worked better than existing methods. The approach separates the main agent’s learning from the smaller agents’ abilities, focusing on improved coordination.

What this means in practice

  • For ai system developers: Build adaptive multi-agent platforms that dynamically generate task-specific collaboration workflows to improve performance on complex reasoning and retrieval tasks.
  • For data analytics teams: Coordinate multiple analytic components by orchestrating their collaboration through generated workflows that verify and refine intermediate results for better insight extraction.

Authors

Ruhao Liu, Qi Li, Shizun Wang, Xinchao Wang

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.