Guide

Agentic Workflow: Stages, Patterns & Examples

An agentic workflow is a goal-directed process where one or more LLM agents plan, act through tools, observe results, and iterate until the goal is met, with humans setting the goal and approving at checkpoints. Here is what that means, the stages, the five core patterns, and a software example walked end to end.

By Kylian Migot · Updated July 2026 · 11 min read

Quick answer

An agentic workflow is a goal-directed process in which one or more LLM agents plan, take actions through tools, observe the results, and iterate until a goal is met, with humans setting the goal and approving at checkpoints. It differs from a fixed script or RPA, which has no reasoning, and from a single prompt-and-reply, which has no tools and no iteration. In software, the stages run intake, context, plan, execute, verify, review, ship.
One-line definition
Agents plan, act via tools, observe, and iterate toward a goal, with human checkpoints
Not the same as
A fixed script/RPA (no reasoning) or a single prompt/reply (no tools, no loop)
The five patterns
Prompt chaining · routing · parallelization · orchestrator-workers · evaluator-optimizer
Software stages
Intake → context → plan → execute → verify → review → ship
01

What an Agentic Workflow Actually Is

An agentic workflow is a goal-directed process in which one or more LLM agents plan a course of action, take steps through tools, observe what happened, and iterate until the goal is met. The defining trait is the loop: the agent is not executing a script someone wrote in advance, it is choosing its next action from what it just observed. A human sets the goal and approves at checkpoints; the agent works out the how.

Two properties separate this from everything that came before it. First, tool use: an agentic workflow acts on the world, it edits a file, runs a test, queries a database, opens a pull request, rather than only producing text. Second, iteration on feedback: it reads the result of an action and decides the next one, so a failed test becomes a fix attempt rather than a dead end. Take away the tools and you have a chatbot; take away the loop and you have a one-shot generator. An agentic workflow needs both.

02

Versus Traditional Automation and a Single Chatbot Turn

The clearest way to pin the definition is by contrast. An agentic workflow is not the same as traditional automation, and it is not the same as a single prompt-and-reply, and it fails differently from both.

DimensionFixed script / RPASingle prompt / replyAgentic workflow
Decides the pathNo, human wrote it in advanceNo, one turn onlyYes, at runtime from observations
Uses toolsYes, but on fixed railsNo, text out onlyYes, chooses which and when
Iterates on feedbackNo, breaks on the unexpectedNoYes, loops until done or bounded
Handles noveltyPoorly, rigid by designOnly within one answerWell, reasons about new cases
PredictabilityHigh, deterministicHigh per turnLower, needs guardrails
Main failure modeBreaks when a field movesWrong single answerRuns away without bounds

RPA replays recorded steps and shatters the moment a button moves; a single chatbot reply reasons but cannot act or self-correct. An agentic workflow reasons and acts and loops, which is why it handles novelty the other two cannot, and also why it can fail in ways they cannot: an unbounded loop, a confidently wrong action taken and never checked. Flexibility is bought with the need for guardrails. The rest of this guide is about spending that flexibility well.

03

The Stages of an Agentic Software Workflow

Abstractly, every agentic workflow cycles plan → act → observe. For building software, that abstract loop takes a concrete, repeatable shape. Seven stages, with human gates at the two points where a wrong turn is most expensive:

  1. 1

    Intake: capture the goal

    A human states what they want in one or two sentences, 'add rate-limiting to the public API', not a step-by-step recipe. The goal, not the procedure, is the input; supplying the procedure would make this automation, not an agentic workflow.
  2. 2

    Context gathering

    The agent reads what it needs to reason well: the relevant files, project conventions, schemas, docs. What it can see decides the quality of everything downstream, which is why this stage is a discipline of its own, context engineering.
  3. 3

    Plan / spec, approved (gate 1)

    The agent proposes a plan: scope, files it will touch, acceptance criteria, exclusions. A human approves it before any code is written. This is the cheapest place to catch a misunderstanding, and it is the core of spec-driven AI development.
  4. 4

    Execute via tools

    Now the loop runs: the agent edits files, runs commands, and uses git, choosing each action from the last result. This is where tool use and iteration earn their keep, and where the agent needs a bounded, well-defined workspace to act in.
  5. 5

    Observe / verify

    The agent runs the tests and checks against the acceptance criteria from the plan. Verification is what turns 'it emitted code' into 'the code does what we asked', and it only works because the plan stage defined something verifiable to check against.
  6. 6

    Review (gate 2)

    The finished change lands as a pull request, described and reviewable, and a human reads it against the approved plan. Review, not keystroke-watching, is the unit of human judgment. Automating the mechanics of this stage is AI PR automation.
  7. 7

    Ship

    On approval, the change merges and deploys. The loop closes, and the workflow is ready for the next goal, ideally from a fresh, clean context rather than a session that has accumulated the whole history.

Your AI workspace for shipping software.

Download AIDEN free and point it at your existing Claude Code or Codex setup. No credit card, running in minutes.

Download AIDEN free

Free to start · macOS 12+ · No credit card required

04

The Five Agentic Workflow Patterns

Inside the execute stage, agents combine a small set of building blocks. Anthropic's widely-cited Building effective agents guide names five composable patterns. Represented plainly:

Prompt chaining

Split a task into ordered steps, each step's output feeding the next, with optional checks between them. Use it when a task decomposes cleanly into a fixed sequence, e.g. draft a spec, then generate code from it, then write tests. Trades a little latency for much higher accuracy on each step.

Routing

Classify the input, then send it to the handler or model best suited to it. A support query routes to refunds vs. technical vs. billing; a simple edit routes to a cheap fast model, a gnarly refactor to a strong one. Separation of concerns keeps each path focused.

Parallelization

Run independent subtasks at the same time (sectioning), or run the same task several times and aggregate (voting). Useful when subtasks don't depend on each other, or when multiple attempts and a vote raise confidence, e.g. review a diff for security and for style in parallel.

Orchestrator-workers

A lead agent decomposes the goal and delegates subtasks to worker agents dynamically, then synthesizes their results. Unlike static parallelization, the orchestrator decides the subtasks at runtime, right for open-ended goals where you can't predict the breakdown in advance.

Evaluator-optimizer

One agent produces a result; a second evaluates it against explicit criteria and returns feedback; they loop until the criteria are met. Ideal when you have clear standards and iterative refinement measurably helps, e.g. generate, critique, and revise until tests pass and the spec is satisfied.

Combine, don't cargo-cult

Real workflows compose these, an orchestrator that routes subtasks, each running a chain with an evaluator loop at the end. Start with the simplest thing that could work: a single well-prompted call often beats an elaborate multi-agent graph. Add a pattern only when it earns its complexity.
05

A Worked Example: Rate-Limit an API Endpoint

Abstractions land better on a concrete task. Take a real, bounded story, “add rate-limiting to the public API”, and follow it through the stages.

  1. 1

    Intake

    You write the card: 'Rate-limit the public API, 100 requests/min per API key, return 429 with a Retry-After header.' A goal with a concrete done-condition, not a procedure.
  2. 2

    Context gathering

    The agent reads the routing layer, finds where public routes are mounted, checks whether a middleware pattern already exists, and notes the auth code that identifies the API key. It now knows where the limiter belongs and what it can key on.
  3. 3

    Plan / spec (you approve)

    It proposes: add a token-bucket middleware, back the counter with the existing Redis client, apply it at the public-router boundary, return 429 + Retry-After, and add unit tests for the limit and the reset window. Files: middleware/rate-limit.ts, the router, a test file. Exclusions: internal routes untouched. You approve, or tighten the numbers first.
  4. 4

    Execute

    In its own worktree, the agent writes the middleware, wires it into the public router, and adds the tests, running the suite as it goes and fixing what fails. The loop, act, observe the red test, adjust, is the workflow's engine.
  5. 5

    Verify

    It runs the tests against the acceptance criteria: 101st request in a minute returns 429, the Retry-After header is present, the window resets. Green means the stated goal is met, not merely that code exists.
  6. 6

    Review & ship

    It opens a PR titled for the story, with the approved spec as the description, so you review the diff against a written intention. You read it, confirm internal routes are untouched, and merge. The endpoint is rate-limited; the loop is closed.

Notice what each stage bought you: intake kept you stating goals, not typing code; the plan gate let you correct scope for the price of a sentence; execution and verification ran without you babysitting; review kept the final judgment human. That is a single-agent agentic workflow end to end. Run several of these at once and you are into a multi-agent coding workflow, same stages, parallelized, with story slicing and a review budget as the new constraints.

06

Where Agentic Workflows Fail, and How to Bound Them

The same flexibility that lets an agentic workflow handle novelty lets it fail in novel ways. A fixed script fails by breaking; an agentic workflow fails by confidently doing the wrong thing, repeatedly. Four failure modes account for most of it, and each has a specific bound:

Unbounded loops

The agent keeps trying, tokens keep burning, and nothing converges. Bound it: cap iterations, tool calls, and total cost per run, so an unproductive loop stops instead of spinning forever.

No acceptance criteria

Without a written definition of done, the agent guesses when to stop and you cannot tell whether it succeeded. Bound it: every run starts from a spec with concrete, checkable acceptance criteria, the thing verification tests against.

No human checkpoint

A workflow that plans and ships with no gate can push a wrong-but-confident change straight to production. Bound it: put a human gate where a mistake is expensive, most importantly a PR review before anything merges.

Context rot

Over a long run, a stale file, a hallucinated API, or an early wrong assumption stays in the window and skews every later step. Bound it: keep context curated and prefer a fresh session per goal over one marathon run.
07

How AIDEN Operationalizes the Agentic Workflow

You can run every stage above by hand, and it is worth doing once to feel where the friction is. AIDEN's contribution is to make each stage explicit and enforced on a kanban board, rather than something you hold in your head. AIDEN is a cockpit over your local Claude Code and Codex CLIs: it does not replace the agents, it structures the workflow around them, and you bring your own inference (your existing Claude or Codex subscription or API key).

The plan gate is a column

A story card gets a spec drafted from the card and codebase analysis, and it sits in spec review until you approve it. The plan stage is not optional or implicit, it is an enforced gate on the board.

Execution is isolated

On approval, the story runs in its own git worktree and session. The execute stage has a bounded workspace by default, so parallel stories cannot collide and each stays reviewable.

Review is a PR per story

Each story lands as one pull request with its approved spec as the description. The review stage gives you a diff to read against a written intention, not a chat log to reconstruct.

The board is the workflow

Every stage is a column, so the whole agentic workflow is visible at a glance: an AI kanban board where each agent is a card showing what is planned, running, and awaiting review.

It is free for one project and $19/mo for solo use, so the cheapest way to understand an agentic workflow is to run one real story, an actual small feature, through the loop and review the PR it produces.

FAQ

What is an agentic workflow?
An agentic workflow is a goal-directed process in which one or more LLM agents plan, take actions through tools, observe the results, and iterate until a goal is met, with humans setting the goal and approving at checkpoints. Unlike a fixed script, the agent decides its own next step based on what it observes; unlike a single chatbot reply, it acts on the world and loops on the feedback rather than answering once.
How is an agentic workflow different from automation or RPA?
Traditional automation and RPA follow a fixed path a human wrote in advance: if this, do that, in a fixed order, with no reasoning at runtime. An agentic workflow decides the path as it goes. Given the goal 'reconcile these invoices', an RPA bot replays recorded clicks and breaks when a field moves; an agent reads the page, reasons about what changed, and adapts. The trade is predictability for flexibility: RPA is deterministic and cheap to run; an agentic workflow handles novelty but needs guardrails and checkpoints because it can also go wrong in novel ways.
What are the main agentic workflow patterns?
Anthropic's 'Building effective agents' guide names five composable patterns: prompt chaining (split a task into ordered steps, each feeding the next), routing (classify the input and send it to a specialized handler), parallelization (run independent subtasks at once, or vote across several attempts), orchestrator-workers (a lead agent decomposes the goal and delegates dynamically), and evaluator-optimizer (one agent produces, another critiques against criteria, and they loop). Most real workflows combine a few of these rather than using one in isolation.
What is the difference between an agentic workflow and an AI agent?
An AI agent is the actor: a model given tools and a loop that lets it decide its own next step. An agentic workflow is the surrounding process, the stages, gates, and hand-offs, that puts one or more agents to productive use on a real goal. Anthropic draws a related line between workflows (LLMs orchestrated through predefined code paths) and agents (LLMs that direct their own process). In practice most useful systems sit on a spectrum between the two, and 'agentic workflow' is the umbrella for goal-directed, tool-using, iterating processes across that range.
How do you keep an agentic workflow from running away?
Bound it. Give every run explicit acceptance criteria so 'done' is defined, not guessed. Cap iterations, tool calls, and cost so an unproductive loop stops instead of spinning. Put a human checkpoint where the cost of a wrong turn is high, most importantly before code ships. And keep the context clean: a stale file or an accumulated wrong assumption (context rot) quietly steers every later step. An unbounded loop with no acceptance criteria and no human gate is the classic way these workflows fail.

Keep reading

See an agentic workflow with every stage made explicit.

AIDEN runs the whole loop on a kanban board: a spec gate for planning, an isolated worktree for execution, a reviewed PR for the ship gate. Free for one project, $19/mo solo.

macOS 12+ · Bring your own Claude Code or Codex · Your code stays local