Stage 06 of 11 · Agentic Workflows · 3 min · Reviewed Aug 2026
Agentic Workflows: Branch, Chain, Merge, Suspend, Stream
Once an agent can call tools, the next failure is unstructured control flow. Workflows make branching, chaining, merging, suspend/resume, and streaming explicit. The model still chooses inside a node. The graph decides which nodes exist.
- Branching
- Chaining
- Merging
- Conditions
- Suspend/resume
- Streaming
What you learn
How to build reliable multi-step systems with explicit control flow instead of an unbounded chat loop.
A loop is not a workflow
The basic agent loop (model → tool → model) is a while. It is the right first implementation. It is the wrong last one for anything with approvals, fan-out, or human wait.
A workflow is a graph: named nodes, typed state, edges with conditions. You can test a node. You can replay from a checkpoint. You can see why a branch was taken. Frameworks (LangGraph-style graphs, Temporal/Inngest-style durable functions, Mastra and others) differ; the idea does not.
Visual
Simple Loop vs Named-Node Graph
A while-loop re-enters the same block blindly. A workflow graph names every node, types every edge, and lets you replay from any checkpoint.
Chaining and branching
Chain when the output of A is the input of B (research then draft then review). Branch when a condition decides the path (if tests red then debug, else review). Keep conditions on data, not on vibes: tests.failed > 0, not “if it seems risky.”
The model may predict a branch. Software must evaluate the predicate. Otherwise you cannot replay.
if (state.tests.failed > 0) return "debug";
return "review";Visual
Chain and Branch Patterns
Chaining passes output forward sequentially. Branching splits on a deterministic predicate — the model may suggest, but software must evaluate.