Submit

Agentic Workflows: 5 Patterns and When to Use Each

Agentic workflows let a model choose its next step at runtime. Five patterns from Anthropic and LangGraph, real GitHub and IBM examples, and when to skip them.

Written by AiAgentsListing Team

•8 min read
Agentic Workflows: 5 Patterns and When to Use Each

Agentic workflows: what they are and how to build one

Agentic workflows are the way most teams put a language model to work on a multi-step job without handing it the whole job. The model reads the situation, picks a tool, checks what came back and decides what to do next. This post separates the vocabulary, walks through five patterns you can copy, and says when a plain LLM call is the better choice.

Agentic workflows are multi-step AI processes in which a language model decides at runtime what to do next, calls tools, checks the results and repeats until a goal is met. The goal is fixed, but the path is not. That separates them from fixed pipelines, where code decides every step in advance.

How agentic workflows work

An agentic workflow works by looping through four activities: planning, tool use, reflection and orchestration. Neo4j's March 2026 guide describes the loop this way: the system interprets the goal and decides what to do, executes an action with a tool, reflects on the result and loops back to plan again if the goal is not met, and coordinates several agents and states when the job needs it.

Neo4j also lays out where the line sits between three kinds of workflow:

Workflow typeHow it runsBest for
DeterministicFixed steps and rulesStable, repeatable processes
Non-agentic AIFixed pipeline with an LLM stepBounded tasks like summarizing, classifying, extracting
Agentic AIPlans, uses tools, iterates with feedbackInvestigation, diagnosis, open-ended work

Two definitions in circulation

The term is used in two ways, and mixing them causes most of the confusion in design discussions. Anthropic's Building effective agents calls everything an "agentic system" and then splits it. 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.

IBM and Neo4j use "agentic workflow" for the adaptive kind: IBM defines it as AI-driven processes where autonomous agents make decisions, take actions and coordinate tasks with minimal human intervention. In practice you will build something on a spectrum between the two. The five patterns below sit at the predictable end of it, and Anthropic's autonomous agent sits at the other.

The five agentic workflow patterns

Anthropic's post publishes five workflow patterns that developers can combine, and LangChain's LangGraph docs implement the same set with a graph API. Anthropic says these are not prescriptive: shape and combine them to fit the use case, and add complexity only when it demonstrably improves outcomes.

Anthropic's Building effective agents page, published 19 December 2024, listing prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer as the common agentic system patterns.

1. Prompt chaining

Prompt chaining splits a task into a sequence where each LLM call processes the output of the previous one. You can add a programmatic check, which Anthropic calls a gate, on any intermediate step to confirm the process is still on track. Use it when the task decomposes cleanly into fixed subtasks. It trades latency for accuracy by making each call easier. Anthropic's examples: generate marketing copy and then translate it, or write an outline, check it against criteria, then write the document.

2. Routing

Routing classifies an input and sends it to a specialized follow-up task. It keeps prompts focused, because optimizing one prompt for one kind of input can hurt performance on other inputs. Anthropic's examples are sorting customer service queries (general questions, refund requests, technical support) into different downstream processes, and sending easy questions to a smaller model such as Claude Haiku 4.5 and hard ones to a more capable model such as Claude Sonnet 4.5.

3. Parallelization

Parallelization runs LLM calls at the same time and aggregates the outputs in code. It comes in two variants. Sectioning splits a task into independent subtasks. Voting runs the same task several times for diverse outputs. Anthropic cites guardrails as a sectioning case (one instance answers the user while another screens the request) and code review for vulnerabilities as a voting case, where several prompts each flag a problem.

4. Orchestrator-workers

In the orchestrator-workers pattern a central LLM breaks a task into subtasks, delegates them to worker LLMs and synthesizes the results. It looks like parallelization, but the subtasks are not predefined: the orchestrator picks them from the input. Coding tools that change several files per task are the standard case, because the number of files and the change in each depend on the task. LangGraph supports this with its Send API, which creates worker nodes dynamically and gives each one its own state while all worker outputs land in a shared state key.

5. Evaluator-optimizer

Evaluator-optimizer puts one LLM call in a loop with another: one generates a response and the other evaluates it and returns feedback. Anthropic says it fits when you have clear evaluation criteria and when iterative refinement has measurable value. Its two signs of a good fit are that responses improve when a human articulates feedback and that the LLM can produce that feedback. Neo4j's version of this idea is the reflection pattern, and its advice is to cap the number of iterations, define explicit evaluation criteria and use a second prompt or model as the critic.

Examples of agentic workflows in practice

The clearest examples are the ones that ship: IBM's support scenario, GitHub's repository automation and the LangGraph code that wires a chain together.

IT support that adapts

IBM contrasts a rule-based IT chatbot with an agentic one. When an employee reports that wifi is not working, the rule-based bot runs a static decision tree and escalates if that fails. The agentic version asks clarifying questions, runs diagnostic steps, calls an internal monitoring API if it suspects a server-side issue, changes approach when a step fails, and logs the fix. If the problem stays unresolved it escalates with a report of what it already tried.

GitHub Agentic Workflows

GitHub Agentic Workflows (gh-aw) is repository automation written in Markdown with YAML frontmatter and run in GitHub Actions. The overview page says the gh-aw CLI compiles the source into a standard Actions workflow while adding controls for permissions, tools, sandboxing and writes. This is the example on its home page:

---
on:
schedule: daily
permissions:
contents: read
issues: read
pull-requests: read
safe-outputs:
create-issue:
title-prefix: "[team-status] "
labels: [report, daily-status]
close-older-issues: true
---

## Daily Issues Report

Create an upbeat daily status report for the team as a GitHub issue.

## What to include

- Recent repository activity (issues, PRs, discussions, releases, code changes)
- Progress tracking, goal reminders and highlights
- Project status and recommendations
- Actionable next steps for maintainers

The agent gets read-only access to repository context and can only request the outputs declared under safe-outputs. The site lists five stable built-in engines: GitHub Copilot (the default), Claude Code, OpenAI Codex, Google Gemini and Pi. Custom engine definitions for Cursor, Kiro and Aider exist as unsupported samples.

GitHub Agentic Workflows home page describing Markdown repository automation run by coding agents in GitHub Actions, with built-in guardrails, cost controls and a list of supported AI engines.

Prompt chaining in LangGraph

The LangGraph docs build a chain with a StateGraph: nodes are functions, edges connect them, and a conditional edge acts as the gate. This excerpt is the wiring from the docs' example, with the State class and the three node functions defined earlier on the page:

workflow = StateGraph(State)

workflow.add_node("generate_joke", generate_joke)
workflow.add_node("improve_joke", improve_joke)
workflow.add_node("polish_joke", polish_joke)

workflow.add_edge(START, "generate_joke")
workflow.add_conditional_edges(
"generate_joke", check_punchline, {"Fail": "improve_joke", "Pass": END}
)
workflow.add_edge("improve_joke", "polish_joke")
workflow.add_edge("polish_joke", END)

chain = workflow.compile()

The gate, check_punchline, is an ordinary Python function. A failed check routes the output through two more LLM calls, and a passing one ends the run. The same page shows each pattern in both a Graph API and a Functional API version.

LangChain's LangGraph documentation page for workflows and agents, showing setup steps and the list of patterns: prompt chaining, parallelization, routing, orchestrator-worker and evaluator-optimizer.

When to use agentic workflows (and when not)

Use an agentic workflow when the path to the result cannot be written down in advance, and skip it when a single well-prompted call would do. Anthropic recommends finding the simplest solution possible, which can mean not building an agentic system at all, because these systems often trade latency and cost for better task performance. For many applications, it says, optimizing single LLM calls with retrieval and in-context examples is enough.

Choose by how predictable the work is:

  • Fixed subtasks: prompt chaining. The steps are known and each one is easier alone.
  • Distinct input categories: routing, provided an LLM or a classical classifier can sort them accurately.
  • Independent checks or several attempts: parallelization.
  • Unknown subtasks, such as multi-file code changes: orchestrator-workers.
  • Clear quality criteria and room to iterate: evaluator-optimizer.
  • Open-ended problems with no predictable step count: a full agent. Anthropic warns this means higher costs and compounding errors, and recommends extensive testing in sandboxed environments with guardrails.

Neo4j adds production requirements: give each plan step a success or failure condition so the workflow can continue, retry or stop, and define tools with typed inputs and validated outputs. Anthropic's first principle is to keep the design simple, and it suggests starting with LLM APIs directly, since many patterns take a few lines of code. If you use a framework, understand the code under it: Anthropic calls incorrect assumptions about what is under the hood a common source of customer error.

If you are choosing what to build on, aiagentslisting.com lists about 587 published entries, including agents, MCP servers that give a workflow its tools, and skills.

What's new (as of 24 September 2026)

  • Anthropic's framing has an update note. The Building effective agents post was published on 19 December 2024. A note at the top says much of the tooling landscape it describes has changed since then and points to Anthropic's Managed Agents documentation for its current approach. The five patterns are unchanged in the post text.
  • Neo4j published a four-part taxonomy on 11 March 2026. It names planning, tool use, reflection and orchestration as the reusable patterns and recommends the Model Context Protocol as the standard interface for exposing tools.
  • GitHub Agentic Workflows now documents cost controls. Its home page describes max-ai-credits as a hard budget for each run, and gh aw logs and gh aw audit for finding the runs that use the most time, tokens and AI Credits. Sandbox runtimes include standard Docker and a preview cloud-hypervisor option.
  • LangGraph docs use current syntax. The workflows page, fetched on 24 September 2026, uses claude-sonnet-4-6 in its setup and streams the Functional API examples with stream_events(..., version="v3").

Key takeaways

  • An agentic workflow fixes the goal and lets the model choose the path, while a deterministic workflow fixes every step in code.
  • Anthropic calls fixed-path systems workflows and model-directed systems agents, whereas IBM and Neo4j use "agentic workflow" for the adaptive kind.
  • The five common patterns are prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer, and each fits a different kind of predictability.
  • Cap loop iterations, give every step a success condition and test in a sandbox before giving a workflow write access.
  • Start with a single LLM call and add a pattern only when it measurably improves the result.

FAQ

What is the difference between an agentic workflow and an AI agent?

An AI agent is the component that decides, and an agentic workflow is the process it runs inside. Anthropic draws a stricter line: in its terms a workflow follows predefined code paths and an agent directs its own process. IBM says a workflow is not agentic unless it contains an AI agent.

Are agentic workflows more expensive than a single LLM call?

Yes, usually. Anthropic says agentic systems often trade latency and cost for better task performance, and that fully autonomous agents mean higher costs and the potential for compounding errors. Use them where the extra calls buy a measurably better result.

Do I need a framework to build an agentic workflow?

No. Anthropic suggests starting with LLM APIs directly because many patterns take a few lines of code. LangGraph is one option: its docs say it adds persistence, streaming, debugging support and deployment when you build workflows and agents on it.

How do I keep an agentic workflow safe?

Limit what the model can do and check what it proposes. GitHub Agentic Workflows layers sandboxing, scoped permissions, validated safe outputs and a threat-detection job that scans proposed outputs. Anthropic recommends sandboxed testing with guardrails, and Neo4j recommends capping the number of iterations.

Browse the AI agents directory to compare tools that already run these patterns.

Share:

Subscribe to our newsletter

One email a week. New agents, MCP servers and skills, and what is actually getting traction.

Read next