Workflow – Mangrove

GlossaryAgents and tools

Workflow

Definition: A workflow is a system in which code written in advance sets the paths that language model calls and tools follow through a task.

Anthropic’s Building effective agents separates two kinds of system built from large language models (LLMs): “Workflows are systems where LLMs and tools are orchestrated through predefined code paths,” while agents “are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.” In a workflow, a model may write text, extract data or classify an input, and in some patterns its output picks the next branch or sets the subtasks, but the paths themselves are written in the code. The post names five workflow patterns. In prompt chaining, each model call works on the output of the one before. In routing, an input is classified and sent to a step built for its category. In parallelization, several calls run at once and code combines their outputs. In orchestrator-workers, one model call decides how to split each input into subtasks and hands them to other model calls. In evaluator-optimizer, one call writes a response and another reviews it in a loop. Anthropic counts workflows and agents alike as “agentic systems”, a broader idea covered in the Agentic AI entry.

One practical difference is how much of the system can be reviewed before it runs. For example, a trading workflow may run the same steps every hour: fetch prices, ask a model to summarize news about each holding, compute a signal in code and send any proposed order through a size check. Its possible paths are written in its code, so a reviewer can read all of them in advance. An agent given the goal of rebalancing the same portfolio may instead choose which data to fetch, which tools to call, in what order and when it is done, so its path is known only after it runs. Anthropic advises “finding the simplest solution possible” and says workflows “offer predictability and consistency for well-defined tasks”, while agents can be used for open-ended problems where it is hard or impossible “to predict the required number of steps”.

The word is older than language models. The Workflow Management Coalition, a nonprofit body that wrote standards for workflow software, defined workflow in its Terminology & Glossary (Issue 2.0, June 1996) as “the automation of a business process, in whole or part,” in which documents, information or tasks pass from one participant to another “according to a set of procedural rules.” Anthropic’s Building effective agents (19 December 2024) used the word for language-model systems that follow predefined code paths, as distinct from agents.