DynaFlow: Learning Free Form Multi Agent Orchestration
Vince and Ava unpack DynaFlow, a framework that lets a main LLM learn to write and adapt real code workflows to orchestrate sub-agents on the fly, and debate whether this kind of learned orchestration is ready for real products or still mostly a research probe into how multi-agent systems should actually coordinate.
Transcript
Vince So this one basically lets the model write its own little orchestration engine in code while it’s solving the problem.
Ava Yeah, instead of us hard-wiring a graph of agents, the main model decides when to spin up a workflow at all and what it looks like.
Vince Which is exactly the thing people have been stuck on with multi‑agent stuff: not more agents, but who talks to whom, in what order, and when you just… don’t bother.
Ava Right. Everyone’s been shipping either rigid pipelines or these prompt-y “brainstormer, critic, summarizer” scripts. DynaFlow is trying to learn the orchestration itself as a skill.
Vince Before we dive, this is episode eleven sixteen, by the way. We’re almost at a year of doing this and we’re still talking about routing and workflows.
Ava ETOOMANYTHINGS stays undefeated.
Vince Okay, give me the straight version. What is DynaFlow actually claiming to fix?
Ava They call the missing capability “free orchestration.” The idea is: different questions need different collaboration patterns. Some are single‑shot, some split into independent subproblems, some need a careful multi‑hop chain with verification. Fixed collaboration trees waste compute and still mess up information flow.
Vince So instead of pre‑drawing the flowchart, they let the main agent sketch a new one per question?
Ava Exactly. Concretely, the main agent has three actions: answer directly, call a tool, or emit a JavaScript workflow program. That program wires up frozen sub‑agents, with sequential or parallel calls and explicit data passing and verification. Then a budgeted runtime executes it and hands back outputs plus an execution trace.
Vince Okay, that’s cool. It’s not just function calls, it’s actual code as the orchestration language.
Ava Yeah. And importantly, they only train the main agent. The sub‑agents stay fixed. So learning is about when to collaborate and how to route information, not about making each worker smarter.
Vince How do they teach it to write these workflows without it just spamming giant JavaScript blobs at everything?
Ava This is where the training recipe matters. They do supervised fine‑tuning in two stages. First, they distill trajectories where some teacher system already produced reasonable workflows: the main agent sees questions, first‑turn reasoning, and the corresponding workflow action.
Vince So basically copy the good planner.
Ava Yeah. Then they curate. They explicitly filter out demonstrations with three coordination pathologies: unsupported premises, biased verification, and information‑flow defects. So if a workflow checks evidence selectively or fails to pass critical intermediate results downstream, that example gets dropped from the second stage.
Vince That’s interesting—they’re supervising on “good collaboration hygiene,” not just right answers.
Ava Exactly. The refinement stage is smaller but higher quality, and it pushes the main agent toward workflows that actually use, verify, and refine upstream outputs instead of treating sub‑agents like oracles.
Vince From a product lens, that’s the part I like. If half your traffic can stay single‑shot and you only pay for the fancy workflow when it matters, that’s how you keep latency and bills sane.
Ava Sure. Although running arbitrary JavaScript that a model wrote is not exactly a cheap or trivial runtime decision.
Vince Yeah, let’s go there. Would you ship this as described?
Ava Not without pretty heavy constraints. The paper assumes a “minimal execution interface,” but in production that means a sandboxed JS engine, strict APIs for what sub‑agents can touch, and guardrails on loops and fan‑out so one bad workflow doesn’t melt your cluster.
Vince You’d probably prune the action space too, right? Like, a small library of orchestrator primitives instead of totally free‑form code?
Ava That’s one of my main quibbles. They lean into free‑form code because it’s expressive, but many products would rather have a typed, limited DSL for orchestration. You can still train the main agent on “write a program,” but the language is safer and easier to analyze.
Vince So you’d basically keep the learning setup, but swap JavaScript for a constrained workflow language and add a bunch of logging.
Ava Yeah. Plus better observability. One nice thing here is they already log execution traces; in a real system I’d expose those to humans so you can say, “why did this answer go wrong?” and see the mis‑wired workflow.
Vince I’m actually surprisingly bullish on this pattern for the weird middle of the market—places where you care a lot about correctness but don’t have the volume to hand‑engineer flows for every task.
Ava Like scientific assistants, complex enterprise search, that kind of thing?
Vince Exactly. You point a main agent at a toolbox of specialist models and let it learn how to choreograph them for your domain, instead of writing hundreds of static DAGs. You still lock it down, but the learning buys you coverage.
Ava I buy that directionally. My hesitation is more about maturity. This feels like a really solid research probe into what good orchestration looks like. Turning it into a product harness is another iteration or two away.
Vince Do they actually ship code, by the way, or is this paper‑only?
Ava There is a GitHub repo and a Hugging Face project under the DynaFlow name. So you can at least poke the framework instead of re‑implementing from scratch.
Vince Nice. So if someone’s already got a pile of Qwen three point five workers and a tool belt, they could treat DynaFlow as an experimental planner layer, see if learned workflows beat their hand‑rolled ones.
Ava With the giant asterisk that you need to understand what it’s emitting. But yeah, as a lab harness to compare “static pipeline versus learned JS orchestration,” it’s pretty ideal.
Vince Alright, Ava, I’m going to call this one: not ready to be your only orchestration system, but very ready to be the weird smart intern you run alongside your existing flows to see where you’re leaving performance on the table.