What is an agentic workflow?
An agentic workflow is a way of using an AI model in several passes instead of one. The model plans, calls tools, looks at what came back, critiques its own draft and revises before it answers. Andrew Ng popularised the term in March 2024 and sorted the patterns into reflection, tool use, planning and multi-agent collaboration.
Part of Glossary: the terms behind MCP, coding agents and shared pages, defined plainly.
The model reads the task and writes a plan: the steps, which tools it will need, and what done looks like.
It carries out one step, often by calling a tool: a web search, a code run, a test suite, a file read.
It looks at what came back and picks the next step, or changes the plan when the result was not what it expected.
It reviews its own draft, finds mistakes and revises. Ng calls this reflection, and it is the cheapest pattern to add.
On the HumanEval coding benchmark, GPT-3.5 went from 48.1% zero-shot to 95.1% inside an agent loop, ahead of GPT-4 zero-shot at 67.0%.
It stops when the plan is done and hands over the result, or asks a person when it is stuck.
Source: Andrew Ng, The Batch: Agentic Design Patterns Part 1
Agentic workflow versus a single prompt
Most people's mental model of an AI model is zero-shot: you ask, it types an answer from the first word to the last, no backspace. Ng's comparison was to asking a person to write an essay straight through without ever deleting a line. People do not work that way, and neither do good results. An agentic workflow gives the model the same freedoms a person has: make an outline, go and look something up, write a draft, read it back, fix the weak part.
The numbers made the case. On the HumanEval coding benchmark, GPT-3.5 scored 48.1% zero-shot and GPT-4 scored 67.0%. Wrapped in an iterative agent loop, GPT-3.5 reached 95.1%. Ng's conclusion was that the jump between model generations was dwarfed by the jump from changing how the model was used. That is still the main argument for the pattern: the workflow is often worth more than the next model.
The four patterns
Reflection is the model reading its own output as a critic and revising. It needs nothing but a second prompt. Tool use gives the model functions to call, so it can fetch facts, run code and act on systems instead of guessing. Planning has the model decompose a goal into steps before it starts, and reorder them as it learns. Multi-agent collaboration splits the job between models with different instructions, a coder and a reviewer for instance, which often beats one model trying to hold both roles.
Reflection and tool use are the two most teams add first, because each needs only a prompt or a function. Planning and multi-agent setups add more variance. Most coding agents today use all four.
Example: fixing a failing test
Ask a coding agent to make a failing test pass. A single-pass answer would guess a patch from the test name. An agentic workflow runs the test to read the actual failure, opens the two files it names, writes a change, runs the test again, notices a second test now fails, and fixes that too before reporting. Each run is a tool call; each read of the output is an observation; the decision to open a second file is planning adjusted mid-way; the final check before reporting is reflection. Nothing clever happened in any one step. The quality came from the loop.
Why it matters
The pattern changes what the model is for. A single prompt is good for things you can judge at a glance. A workflow is for things with a ground truth the model can check against: tests that pass, searches that return the fact, code that compiles. Where that check exists, the workflow lets a smaller, cheaper model do work that previously needed the largest one, and it leaves a trace you can read when it goes wrong.
Common mistakes
- Adding steps without a check. Reflection only helps when the critique has something to measure against. Asking a model to "make it better" twice produces longer output, not better output. Give it the test, the spec or the style rule.
- Letting the loop run open-ended. Set a step limit or a budget. A workflow that cannot finish will keep calling tools until something external stops it.
- Confusing a workflow with autonomy. A deterministic pipeline that calls the model three times is still an agentic workflow. You do not have to hand the model the steering wheel to get the gains; often you should not.
FAQ
- Is an agentic workflow the same thing as an AI agent?
- They overlap. An agent is the system that runs the workflow; the workflow is the shape of the work: plan, act, observe, revise. Anthropic draws a further line and reserves 'agent' for cases where the model chooses its own steps, while a 'workflow' follows paths the developer fixed in code. Ng's term covers both.
- What are the four agentic workflow design patterns?
- Reflection, where the model critiques and improves its own output. Tool use, where it calls functions such as search or code execution. Planning, where it breaks a goal into steps and follows them. Multi-agent collaboration, where several agents split the work and check each other. Ng listed them in The Batch on 20 March 2024.
- Why do agentic workflows cost more than a single prompt?
- Every pass is another model call, and the context grows with each tool result. A task that took one request might take twenty. The trade is quality for tokens and time, so use the pattern where a wrong answer is expensive and skip it for lookups and simple rewrites.
Stop sending HTMLover Slack.
Create an account in a minute, connect your coding agent, and make your first board.