TL;DR: An agentic workflow breaks a task that is too big for one prompt into multiple model calls connected by ordinary code - sequences, branches, loops, and retries. The structure lives in your program; the model fills in the judgment at each step. It is the middle ground between a single prompt and a fully autonomous agent.
How it works
One prompt can only carry a task so far. Ask a model to "research this company and write a briefing" in a single call and you get shallow work, because everything must happen in one pass. An agentic workflow decomposes the job: one step gathers sources, the next extracts facts from each, a third drafts the briefing, a fourth critiques the draft against the facts, and a fifth revises. Each step is a separate model call with a narrow instruction, and plain code moves data between them.
A handful of patterns cover most workflows. Chaining runs steps in sequence, each consuming the previous output. Routing uses one model call to classify the input, then branches to a specialized prompt for that case - a support system sending billing questions down one path and bug reports down another. Parallelization fans one task out across many simultaneous calls and merges the results. Evaluator-optimizer pairs a generator with a critic in a loop: draft, critique, revise, until the critique passes. Each step can also invoke tools, not just generate text.
The dividing line between a workflow and an agent is who controls the sequence. In a workflow, the developer fixes the steps and the model works inside them. In an agent, the model itself decides what to do next, turn by turn. Workflows trade flexibility for predictability: the same input follows the same path, costs are bounded, and failures point to a specific step. That predictability is why production systems reach for a workflow first and graduate to an agent only when the paths genuinely cannot be enumerated in advance.
Reliability comes from treating each step as a checkpoint. Validate the output of a step before the next one runs; retry with feedback when validation fails; fall back to a simpler path or a human when retries run out. Because state between steps is explicit, a failed run can resume from the last good checkpoint instead of starting over - something much harder to arrange when a single model drives everything, and the same discipline that spec-driven development applies to coding tasks.
Where it sits in the AI stack
A workflow is orchestration code sitting between the request and the model, deciding which calls happen and in what order:
Because every step is observable, workflows pair naturally with tracing - each step's input and output can be logged, measured, and regression-tested on its own.
Key tools and implementations
-
LangGraph
Expresses workflows as graphs with explicit state, branches, and cycles between steps.
-
Durable execution engines
Temporal-style runtimes that checkpoint every step so long workflows survive crashes and restarts.
-
Plain code
Functions calling a model API in sequence - the simplest workflow engine and often the right one.
-
Visual pipeline builders
Drag-and-drop tools that wire model steps into flows for teams that do not want to code them.
Related entries
- AI agent A system where a language model plans, calls tools, and loops on results to finish a task with minimal supervision.
- Multi-agent systems An architecture where several AI agents split a task, each handling one role, coordinated by an orchestrator or a shared plan.
- Tool use (function calling) Letting a language model request actions by emitting structured calls that your code executes and whose results feed back in.
- Spec-driven development Writing a detailed specification first so AI coding agents implement, and get reviewed, against an agreed plan.