# DynaFlow trains a 27B model to design its own agent teams

> NUS researchers say a Qwen3.5-27B agent that writes workflow programs reaches 88.08% on six reasoning benchmarks, 10.9 points above the best baseline.

URL: https://claudegpt.si/news/dynaflow-multi-agent-orchestration  
Published: 2026-10-27T10:53:04.786Z  
Author: ClaudeGPT Si Newsroom  
Section: Research  
Topics: DynaFlow, Multi-agent systems, Qwen, Research  
Publisher: ClaudeGPT Si

## Key takeaways

- NUS authors train only the main agent, a Qwen3.5-27B model, to write JavaScript workflows that coordinate frozen sub-agents.
- They report 88.08% overall accuracy on 688 questions in six benchmarks, against 77.18% for the best baseline, Self-Refine.
- Code is public under an MIT license; the paper and README do not mention released weights.

DynaFlow is a training method from researchers at the National University of Singapore that teaches an AI agent to write its own team of helper agents for each question, as a short program. In [the paper](https://arxiv.org/abs/2610.34467), posted as arXiv 2610.34467, the authors say a 27-billion-parameter model trained this way reaches 88.08% overall accuracy on six reasoning benchmarks, against 77.18% for the best baseline they tested. The [code](https://github.com/amiya-special/Dynaflow) is public. The paper does not say whether trained weights are.

## The problem: fixed teams of agents

Many multi-agent systems use a fixed layout. One agent drafts, another checks, a third summarizes, whatever the question. The authors argue the right layout depends on the task: a math problem needs solvers and verifiers, while a multi-hop factual question needs researchers.

Handing a model the freedom to design its own team does not work by default. In the paper's results, the untrained Qwen3.5-27B model gets worse when it is allowed to choose workflows (65.12% overall) than when it simply answers (71.51%).

## What the team did

DynaFlow adds one action to the main agent: writing a JavaScript program that defines sub-agent roles, which run in sequence or in parallel, and how outputs pass between them. A runtime with a budget executes the program and returns the result and a trace.

Only the main agent is trained. The sub-agents stay as the untrained Qwen3.5-27B. Training has two stages, both using QLoRA, a method that fine-tunes a compressed model with small add-on weights:

- Stage 1 fine-tunes on first-turn demonstrations from a teacher model, GLM-5.3 Max, drawn from HotpotQA and BrowseComp. The paper gives 2,257 examples in an appendix and 2,031 in the main text, so the count is inconsistent.
- Stage 2 continues on 712 selected examples. A judge model, deepseek-flash, removes demonstrations with flaws such as premise injection, biased verification or broken information flow.

## What the results show

The authors test on 688 questions: AIME 2024, 2025 and 2026 (30 each), PolyMATH (200), GPQA-Diamond (198) and HotpotQA (200). Baselines are chain-of-thought, self-consistency with five samples, Self-Refine, AFlow workflows transferred without new search, and the base model with web search.

| Method | Overall accuracy |
| --- | --- |
| Chain-of-thought | 74.27% |
| Self-Refine (best baseline) | 77.18% |
| Base model, forced workflow | 75.87% |
| DynaFlow, dynamic mode | 87.94% |
| DynaFlow, forced mode | 88.08% |

In dynamic mode the model chooses between answering directly and writing a workflow. The authors report it answers 47.1% of questions directly, and uses 2.44 sub-agents per question on average against about 4.16 when a workflow is forced. That is roughly 41% fewer, for a 0.14-point drop in overall accuracy.

On HotpotQA, DynaFlow scores 84.50% (dynamic) and 83.50% (forced). The base model with web search scores 77.50%.

The authors also say workflows changed shape with training. Mixed parallel and sequential designs rose from 3.4% of the base model's workflows to 85.6% after stage 2, and programs that explicitly pass upstream outputs onward rose from 12.6% to 97.7%.

## Where it falls short

DynaFlow does not win everywhere. On GPQA-Diamond, Self-Refine (88.38%) and AFlow (87.37%) beat both DynaFlow modes (83.84% and 84.85%). The authors attribute some failures there to wrong sub-agent conclusions misleading the verifier.

Other limits, mostly from the paper's own discussion, since it has no limitations section:

- Everything uses one backbone, Qwen3.5-27B, and a fairly small benchmark set.
- Training uses first-turn examples only, and sub-agents are never trained.
- The paper says a control using a random subset of the same size is needed to separate the effect of curation from extra training. The text we read does not report that result.
- The teacher and judge are other large models, so the gains rest on distilled behavior.

These are the authors' own numbers. We have not seen independent replication.

## Why it matters

The useful finding is that orchestration can be learned, and that a small model can do it. The same base model that did worse with workflows than without became the best system in the table after training on a few thousand examples. Teams building agent pipelines by hand may want to watch whether the effect holds on other models and on longer tasks.

The repository, under an MIT license, runs in direct, dynamic and forced modes. It needs Python 3.11, Node.js 24 and Docker, and an OpenAI-compatible API. Its README mentions no released checkpoints.

## Frequently asked questions

### What is DynaFlow?

DynaFlow is a training method from the National University of Singapore. It teaches a main agent to write executable workflow programs that assign roles to sub-agents and pass results between them.

### Is DynaFlow open source?

The code is public on GitHub under an MIT license. Neither the paper text nor the README says that trained model weights are released.

### Does DynaFlow beat other methods on every benchmark?

No. On GPQA-Diamond, Self-Refine and AFlow score higher than both DynaFlow modes, according to the paper's table.

## Sources

- [DynaFlow: Learning Free-Form Multi-Agent Orchestration (arXiv 2610.34467)](https://arxiv.org/abs/2610.34467), arXiv
- [DynaFlow: Learning Free-Form Multi-Agent Orchestration (full text)](https://arxiv.org/html/2610.34467), arXiv
- [amiya-special/Dynaflow](https://github.com/amiya-special/Dynaflow), GitHub
