An agentic AI workflow is an automation where a language model makes at least one decision about what happens next. Most good ones are fixed workflows with a model at one or two decision points, not free-roaming agents. Five patterns cover nearly every design: prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer. Start with the simplest that works, and reach for a full agent only when you cannot write the steps down.
An agentic AI workflow is an automation in which a language model makes at least one decision about what happens next: which branch to take, which tool to call, or whether the work is good enough to finish. Classic automation follows paths you wrote in advance. Most agentic workflows worth running are still mostly fixed, with a model placed at one or two decision points, and you only hand over the whole path to an agent when you cannot write the steps down.
Based on vendor documentation, not on benchmarks. Checked on 13 October 2026 against Anthropic's Building effective agents (published 19 December 2024; Anthropic notes on the page that the tooling around it has changed since), LangGraph's workflows and agents page, the n8n docs for the AI Agent node, the Tools Agent, the Text Classifier, human review for tools and execution order, and OpenAI's Agents guide.
This page defines the term, walks through the five patterns the vendors agree on, and builds one example from a plain router up to a contained agent. It sits under our n8n workflow hub; for the short definition of the wider term, see agentic AI in the glossary.
What makes a workflow agentic?
One thing: a model decides something that code used to decide. Anthropic's engineering team groups everything in this space under "agentic systems" and then splits it in two. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths". Agents are "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks".
n8n's docs put the same idea in one line: an agent is "a chain that knows how to make decisions". So the useful question is never "is this agentic?". It is "how many decisions does the model own, and which ones?". The ladder below runs from none to all of them.
- 01Rule-based automation
Code decides everything. If the form says refund, go to the refund branch.
- 02One model call
A model writes or extracts something. The path around it is fixed.
- 03Chain or router
The model output feeds the next step, or picks one of the branches you built.
- 04Evaluator loop
A second model decides whether the work is done or goes back for another pass.
- 05Orchestrator
A model decides what the subtasks are and who handles each one.
- 06Autonomous agent
A model with tools decides every step until it finishes or hits a limit.
Each rung adds flexibility and takes away predictability. It also adds model calls, which is why the top of the ladder is the slowest and most expensive place to stand.
The five agentic workflow patterns
Anthropic's write-up names five workflow patterns below the full agent, and LangGraph's documentation implements the same five in code. They all assume the same building block, which Anthropic calls the augmented LLM: a model with retrieval, tools and memory attached. If you learn these five you can read almost any agent diagram.
| Pattern | How it works | Use it when | Example |
|---|---|---|---|
| Prompt chaining | Each model call works on the output of the one before, with optional checks between steps | The task splits cleanly into fixed subtasks and you will trade speed for accuracy | Write an outline, check it against criteria, then write the document |
| Routing | A classifier reads the input and sends it to a specialised follow-up path | Inputs fall into distinct categories that are better handled separately | Refund requests, bug reports and general questions each get their own prompt and tools |
| Parallelization | Independent subtasks run side by side (sectioning), or the same task runs several times (voting), and code combines the results | Subtasks do not depend on each other, or you want several opinions before trusting a result | One call answers the user while another screens the request against policy |
| Orchestrator-workers | A central model breaks the task down, hands the pieces to worker calls and combines what comes back | You cannot predict the subtasks in advance | A research task where the sources to read depend on the question |
| Evaluator-optimizer | One call produces a result, a second grades it and sends feedback, in a loop | You have clear criteria and a second pass measurably improves the output | A translation that an evaluator checks for nuance before it ships |
Two of them are easy to confuse. Parallelization and orchestrator-workers both fan work out and combine it again. The difference is who chooses the subtasks: in parallelization you fixed them in advance, and in orchestrator-workers the lead model chooses them per input. If you can list the subtasks today, you want parallelization and you save a model call.
The patterns also combine. A router can send one category into a prompt chain and another into an evaluator loop. Anthropic is explicit that these are "common patterns that developers can shape and combine", not a menu where you pick exactly one.
Agentic workflow or AI agent: which do you need?
Start lower than you think. Anthropic's advice is to find "the simplest solution possible" and add complexity only when it is needed, because agentic systems "often trade latency and cost for better task performance". For many applications, the same page says, a single well-built model call with retrieval and examples is enough.
- 1Can one model call with good context do the job?
Yes: stop there. Improve the prompt and the examples before adding steps.
- 2Can you write the steps down in advance?
Yes: build a prompt chain. Each call gets an easier task and you can check the output between steps.
- 3Do inputs fall into a few distinct types?
Yes: put a router in front and give each type its own path. Tuning one type no longer breaks another.
- 4Is the first draft often not good enough, with criteria you can state?
Yes: add an evaluator loop with a retry cap.
- 5Is the number of steps unknowable until the work starts?
Only now consider an orchestrator or a full agent, with limits and a person on the risky actions.
The last question is the real test for an agent. Anthropic reserves agents for "open-ended problems where it's difficult or impossible to predict the required number of steps, and where you can't hardcode a fixed path". Coding and open research fit that description. Sorting an inbox does not.
- Same path every run, so it is testable
- Cost per run is known in advance
- Failures show up at a named step
- Cannot handle a case you did not plan for
- Handles inputs you did not plan for
- Number of model calls varies per run
- Errors can compound across steps
- Needs limits, logging and human review
A worked example: one support inbox, three versions
This example is illustrative, not a case study. The job is a shared support inbox. The temptation is to build "a support agent" with every tool attached. The better build starts as a router and earns each extra decision.
Version 1: a router. One classifier reads each message and picks a category. Three categories have a fixed path, because you can write their steps down. The descriptions matter as much as the names, since the description is what the model reads when it chooses.
| Category | Description given to the model | What happens next |
|---|---|---|
| billing | Charges, invoices, refunds, plan changes | Fixed path: look up the customer, draft a reply from the billing policy, queue it for a person |
| bug | Something in the product is broken or behaving wrongly | Fixed path: extract steps to reproduce, open a ticket, send an acknowledgement |
| how_to | The customer wants to know how to do something | Fixed path: search the help centre, answer only from what it returns, link the article |
| other | Anything that fits none of the above | Agent path: a model with three read-only tools works out what is being asked, capped at five iterations |
Version 2: add an evaluator to the drafts. Billing replies are the ones that cause trouble when they are wrong. A second model call grades each draft against three stated criteria: it answers the question asked, it quotes the policy correctly, and it promises nothing the policy does not. A failed draft goes back once with the feedback. A second failure goes to a person with both drafts attached.
Version 3: a contained agent for the leftovers. Only the other branch gets an agent, because it is the only branch where the steps are unknown. It can read the customer record, read past tickets and search the help centre. It cannot send, refund or delete anything. Its output is a summary and a suggested category for a person to act on.
Count the decisions the model owns: the category, whether a billing draft passes, and the steps inside one branch. Everything else is ordinary automation. That is what most production agentic workflows look like, and it is why the same job needs far fewer model calls than an agent that handles every message end to end.
How to build agentic workflows in n8n or in code
You have three places to build, and the patterns are the same in each. On a canvas such as n8n, a pattern is an arrangement of nodes. In a framework such as LangGraph, it is a graph you write in Python or TypeScript. With a model API directly, it is a function and a loop. OpenAI's Agents guide makes the same split inside its own platform, between a managed agent runtime, an SDK that runs in your application and direct model calls.
| Pattern | In n8n | Worth knowing |
|---|---|---|
| Prompt chaining | Basic LLM Chain nodes in sequence, with an If node as the gate between them | The model writes; your nodes decide the order |
| Routing | A Text Classifier node: each category has a name and a description, and items leave on the matching branch | The model picks the branch; you built every branch |
| Parallelization | Several branches from one node, joined again with a Merge node | n8n runs branches one after another, so you gain focus per call, not speed |
| Orchestrator-workers | An AI Agent node with AI Agent Tool sub-nodes, one per specialist | The lead agent decides who gets which piece |
| Evaluator-optimizer | A writer step, a grader step and an If node that loops back with the feedback | Add a retry cap so the loop always ends |
| Autonomous agent | One AI Agent node with a chat model, tools and optional memory | Max Iterations defaults to 10 |
The node names and the default of 10 iterations come from the n8n docs, checked October 2026. For delegation between agents, including sub-workflows and MCP, see agent-to-agent workflows in n8n. If the loop itself is the hard part, n8n vs LangGraph explains when to move it into code, and our agent builder comparison covers the other canvases.
Anthropic's own suggestion is the third route: start with model APIs directly, since "many patterns can be implemented in a few lines of code", and understand what any framework does underneath before you depend on it. That layer is what our AI SaaS Builder program teaches: Claude API tool use and structured output, MCP servers, and a research agent built step by step. It has no n8n or LangGraph lessons.
Guardrails every agentic workflow needs
The more decisions a model owns, the more of these you need. None of them are optional once an agent can act on real systems.
- A stopping condition on every loop: a maximum number of iterations or retries, set on purpose and not left at the default
- Read-only tools by default; each tool that writes, sends, pays or deletes is added one at a time
- A person approves irreversible actions. n8n can pause a chosen tool for approve or deny through Chat, Slack, Telegram and other channels
- Tool descriptions written like instructions for a new colleague: when to use it, what the inputs mean, what it returns
- Structured output between steps, so the next step reads fields and not prose
- A log of intermediate steps you can open after a bad run
- A test set of real inputs, including the awkward ones, that you rerun after every prompt change
- An error path: what happens, and who is told, when a model call or a tool fails
Tool descriptions deserve more time than they usually get. Anthropic reports that while building its own coding agent the team spent more time optimising the tools than the overall prompt, and fixed one class of mistakes by changing a tool to require absolute file paths. A tool the model misreads is a bug in the tool. Our function calling vs MCP guide covers how tools are described to a model, and the prompt engineering guide covers the instructions around them.
Common mistakes
- Starting with an agent. If you can draw the flowchart, build the flowchart. Add the agent to the one box you could not draw.
- One agent with every tool. A long tool list makes the choice harder for the model. Route first, then give each path only the tools it needs.
- No memory plan. An agent that forgets the last turn repeats work. Agent memory options compared covers what to store and where.
- Judging by one good run. A model can take a different path on the same input. Run the test set, not the demo.
- Ignoring the bill. Every loop iteration is a paid model call. Price a typical run before launch with our LLM API pricing comparison.
For a wider view of what agents are being used for, see AI agent automation in 2026.
Agentic AI workflows: FAQ
What is an agentic AI workflow?
An agentic AI workflow is an automation in which a language model makes at least one decision about what happens next: which branch to take, which tool to call, or whether the result is good enough to stop. Classic automation follows paths written in advance. An agentic workflow hands one or more of those choices to a model, usually inside a structure that a person still designed.
What is the difference between an agentic workflow and an AI agent?
Anthropic draws the line at who controls the path. In a workflow, models and tools are orchestrated through predefined code paths, so you decide the steps and the model fills them in. In an agent, the model directs its own process and tool use, so it decides the steps. Both count as agentic systems. A workflow is more predictable; an agent is more flexible and harder to test.
What are the main agentic workflow patterns?
Anthropic documents five: prompt chaining (each model call works on the previous output), routing (classify the input, then send it to a specialised path), parallelization (split a task or run it several times, then combine), orchestrator-workers (one model breaks the task down and delegates) and evaluator-optimizer (one model writes, another grades, in a loop). LangGraph documents the same five with code.
Can I build an agentic workflow without code?
Yes. In n8n, the Text Classifier node covers routing, Basic LLM Chain nodes in sequence cover prompt chaining, and the AI Agent node runs a tool-calling loop once you connect a chat model and at least one tool. The canvas handles triggers and app logins. You give up fine control of the loop itself, which is where code frameworks such as LangGraph come in.
Are agentic workflows expensive to run?
They cost more than a single model call, because every decision and every tool round is another call. Anthropic says agentic systems often trade latency and cost for better task performance, and that autonomous agents mean higher costs and the potential for compounding errors. The cheap designs keep the model at one or two decision points and cap the number of loop iterations.
When should I not use an AI agent?
When you can write the steps down. If the task breaks cleanly into fixed stages, a workflow is easier to test, cheaper to run and fails in more predictable ways. Anthropic reserves agents for open-ended problems where you cannot predict the number of steps or hardcode a path, and adds that for many applications one well-built model call with retrieval and examples is enough.
Do agentic workflows need a framework?
No. Anthropic suggests starting with model APIs directly, because many patterns take a few lines of code, and warns that frameworks can hide the underlying prompts and responses and make debugging harder. A framework or a canvas earns its place when you need what it adds: saved state, pauses for a person, app integrations or a visual record other people can read.
Every guide in this hub
Free · no card needed
Start with the free Starter Kit.
A unit economics calculator from AI SaaS Builder, plus four more working files.
Know the patterns? Build one on the API underneath.
AI SaaS Builder, included in All Access, teaches the layer every agent framework sits on: Claude API tool use and structured output, MCP servers, and a research agent built step by step, then Supabase, Vercel and Stripe to ship it as a product. It has no n8n or LangGraph lessons. The other three programs, weekly coaching and the community come with the same subscription.
Not sure which pattern your job needs?
Describe the trigger, the steps you can write down and the ones you cannot in the free Discord, and compare notes with people running routers, evaluator loops and agents in production.