← back to the archiveCover illustration for “Agentic workflow: model steps chained by your code”
TERM7mo ago·Published · Updated ·by Andy Padia

Agentic workflow: model steps chained by your code

In short: An agentic workflow chains LLM and tool calls along a path your code controls, which makes it easier to test, cost and audit than an autonomous agent.

An agentic workflow is a sequence of language-model calls and tool calls where your code decides the path and the model works inside each step. Anthropic's December 2024 guide defines workflows as systems where LLMs and tools are orchestrated through predefined code paths, and names five patterns: prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer.

Agentic workflow in plain words

Think of a recipe with a chef. The recipe fixes the steps; the chef applies judgment inside each one. An autonomous agent is a chef who also writes the recipe as they go.

How it works

  1. Break the task into steps you already understand.
  2. Give each step one focused prompt and, where needed, one tool.
  3. Pass outputs forward, with checks between steps.
  4. Add a branch where the input type changes the path (routing), or run independent steps in parallel.

An evaluator-optimizer pattern adds a second model call that grades the first and asks for a revision until a bar is met.

Anthropic's advice in the same guide is to find the simplest solution possible and add complexity only when needed. LangGraph's workflows and agents documentation draws the same line: workflows have predetermined code paths, while agents define their own processes and tool usage.

Example

As an illustration, take an invoice pipeline: step one extracts fields to JSON, step two validates totals in code, step three drafts a query email only if validation fails. The model never decides whether to email; your code does.

Where you'll meet it

  • Document processing and data extraction pipelines
  • Content generation with review steps
  • Orchestration frameworks such as LangGraph
  • Back-office automations where each step needs an audit trail

What it changes for you

You can test each step on its own, put a cost ceiling on the whole run and explain failures to an auditor. For teams, it means AI work looks like normal software engineering: versioned steps, unit-style evals and clear owners.

Agentic workflow vs AI agent

A workflow follows a path you drew. An agent draws its own path. If you can draw the flowchart, build the workflow.

Common mistake

My view: teams jump to a fully autonomous agent because it demos better, then add back, one by one, the guardrails a workflow would have had on day one. Demoability is not a design requirement.

AI agent · Orchestrator-worker pattern · Model routing · Demoability · Evals

From the archive: When you actually need an AI agent instead of a workflow · How to keep multi-step AI agents under control

If you can draw the flowchart, build the workflow and keep the agent for the paths you cannot draw.

#field-guide#agents#workflows#architecture

Sources

  1. anthropic.com/research/building-effective-agents
  2. docs.langchain.com/oss/python/langgraph/workflows-agents
← older drop
Subagent: a helper agent with its own fresh context
newer drop →
LoRA: fine-tuning a big model by training a small add-on

related drops

explore all 557 drops →
← back to the archiveday 175