Hello! In our previous lesson, we established a foundational understanding of the canonical agent loop: perceive → reason → act → observe. We saw how this cycle forms the engine of an agent, with the LLM acting as the reasoning component within a controller's loop.
Today, we'll build directly on that by exploring two distinct philosophies for deploying this engine. Your learning outcome is to compare 'agentic workflows' with 'autonomous agents' and articulate when each is appropriate. We'll move beyond the simple loop to analyze the architectural trade-offs between highly structured, predictable systems and open-ended, adaptive ones. This distinction is critical for making sound engineering decisions when designing agentic systems.
Defining the Spectrum: Workflows vs. Agents
The terms "agent" and "workflow" are often used interchangeably, but they represent fundamentally different points on a spectrum of autonomy. The team at Anthropic, who have done extensive work in this area, provides a clear distinction that we will adopt.
First, let's establish the core concepts by hearing directly from them.
This short video from Anthropic introduces the key distinction between a 'workflow' and an 'agent'. It establishes the idea that the defining feature of an agent is that the LLM itself decides the control flow.
Please watch the first two minutes of the video, paying attention to these segments: The initial definition, where they contrast a 'workflow' (a fixed number of chained LLM calls) with an 'agent' (an LLM that loops until resolution, deciding its own steps). The evolution of this distinction, which explains why this formal definition is becoming necessary as models and applications grow more complex.
As you just heard, the core difference lies in who—or what—determines the control flow:
-
An Agentic Workflow is a system where the overall control flow is deterministic and human-designed. It's a graph or a sequence of steps, and an LLM is called as a component at specific nodes to handle tasks that require its reasoning capabilities (e.g., classifying an email, extracting information from a document, or summarizing a report). The LLM doesn't decide the overall plan; it executes a specific part of it.
-
An Autonomous Agent is a system where the control flow is non-deterministic and decided by the LLM. The LLM is the central controller, operating within the
perceive → reason → act → observeloop we discussed. It analyzes the situation at each step and decides what to do next, how many steps are needed, and when the task is complete.
This architectural difference can be visualized clearly.

On the left, you see the autonomous agent model: the LLM is in a tight, continuous loop, directing its own actions. This is the architecture we focused on in the last lesson. On the right is the agentic workflow: the LLM is a single step (Task B) in a larger, pre-scripted sequence. It's invoked to make a specific choice (Path X, Y, or Z), but the overall process (Task A → Task B → Task C) is fixed.
Mapping Patterns to the Spectrum
This distinction between workflows and agents maps directly onto the major reasoning patterns you'll encounter. A recent analysis from The AI Engineer newsletter provides an excellent breakdown of these patterns. Let's use it to connect the theory to specific implementations.
ReAct vs Plan-and-Execute vs ReWOO vs Reflexion
This article provides a technical breakdown of four key single-agent patterns, highlighting their architectural differences, trade-offs, and ideal use cases.
Please read the following sections from the article: Start with "What Are We Even Comparing?" to understand the three design choices that differentiate agent patterns. Read the section on ReAct. This is the quintessential pattern for an autonomous agent, where the LLM reasons at every single step. Next, read about Plan-and-Execute. Notice how this separates planning from execution, making it a classic example of an agentic workflow. Finally, read about ReWOO, which takes the workflow concept even further by attempting to run all actions in parallel after a single planning phase.
From the reading, we can draw a clear line:
- ReAct is the archetypal autonomous agent pattern. Its
Thought → Action → Observationcycle embodies the LLM-as-controller model. It's adaptive and flexible because the LLM re-evaluates the entire situation at each step. - Plan-and-Execute and ReWOO are archetypal agentic workflow patterns. They introduce a rigid separation of concerns: a "planner" LLM creates a structured plan, and a simpler, often non-LLM "executor" carries it out. The control flow during the execution phase is deterministic, following the pre-made plan. This makes them more predictable and often more efficient, but less adaptive to surprises.
A Framework for Choosing: When Is Each Appropriate?
Your primary task as an agent architect is to decide where on this spectrum of autonomy your system should lie. Building an autonomous agent when a simple workflow would suffice is a common and costly engineering error. Conversely, a rigid workflow will fail at tasks that require genuine exploration and adaptation.
In another video, Barry Zhang from Anthropic provides an excellent four-point checklist to guide this decision.
How We Build Effective Agents: Barry Zhang, Anthropic
This video offers a practical decision framework for choosing between a workflow and an agent, based on the characteristics of the task.
Watch the segment from "when should you build an agent?". As you watch, focus on the four key criteria he outlines.
Let's synthesize those criteria into a decision framework:
-
Task Ambiguity & Complexity:
- Workflow: Choose a workflow if you can map out the task's decision tree. If the steps are predictable and the logic can be hard-coded (e.g., "if the user category is 'billing', run the
get_invoicetool"), then a workflow is more robust and efficient. - Agent: Choose an agent for ambiguous, open-ended tasks where the path to a solution is unknown. If the task requires exploration, trial-and-error, and dynamic replanning (e.g., "debug this failing test suite"), an agent's adaptability is necessary.
- Workflow: Choose a workflow if you can map out the task's decision tree. If the steps are predictable and the logic can be hard-coded (e.g., "if the user category is 'billing', run the
-
Task Value & Token Budget:
- Workflow: Workflows are more token-efficient. Patterns like Plan-and-Execute and ReWOO minimize LLM calls. This makes them ideal for high-volume, low-margin tasks like basic customer support triage.
- Agent: The iterative reasoning of a ReAct-style agent is expensive. Each step involves an LLM call with a growing context history. This is justifiable only for high-value tasks where the cost of human labor is significant and the successful completion of the task provides substantial value (e.g., complex software engineering, scientific research).
-
Reliability of Critical Capabilities (Tools):
- This is a subtle but crucial point. If your agent relies on a tool that is flaky or has unpredictable outputs, a fully autonomous agent might get stuck in loops or fail silently.
- An agentic workflow allows you to build more robust error handling around the LLM. You can deterministically check the output of a tool before passing it back to the LLM or route to a human-in-the-loop if a tool fails.
-
Cost of Error & Verifiability:
- Workflow: When the cost of an error is high (e.g., executing a financial transaction, deleting production data) and the correctness of an action is hard to verify automatically, a workflow is safer. It allows for more guardrails, checkpoints, and human-in-the-loop approvals.
- Agent: Autonomous agents are best suited for domains where the cost of error is low or where there is a cheap, reliable feedback mechanism to verify correctness. This is why coding is a canonical agent use case: you can run unit tests to get an immediate, automated "pass/fail" signal, which the agent can use to self-correct (a pattern we'll explore later called Reflexion).
This decision process is nicely captured in the flowchart from The AI Engineer article.

You can trace the logic:
- If steps are not dependent and cost is a priority, the highly structured ReWOO workflow is a good fit.
- If steps are dependent, you need adaptation. If self-correction from failure is critical, the more autonomous Reflexion pattern is best. If not, the standard ReAct agent loop is the default.
Conclusion: The Hybrid Reality
In practice, the most robust systems are often hybrids. You might design a Plan-and-Execute workflow, but for a particularly complex step, you could allow the executor to drop into a ReAct-style loop to solve a sub-problem. Frameworks like LangGraph are explicitly designed to enable these sophisticated, graph-based control flows that mix deterministic and non-deterministic execution.
Let's recap the key takeaways:
- Agentic Workflows feature human-designed, deterministic control flows where the LLM is a component. They are predictable, efficient, and safer for high-stakes tasks. Patterns like Plan-and-Execute and ReWOO are prime examples.
- Autonomous Agents feature LLM-directed, non-deterministic control flows. They are adaptive and excel at ambiguous, exploratory tasks but are more costly and less predictable. The ReAct pattern is the classic implementation.
- The choice between them is a critical architectural decision based on task ambiguity, value, verifiability, and cost of error.
In our next lesson, we will dive deeper into the challenges of building these systems by identifying the main failure modes of LLM agents, such as hallucinated tool calls, infinite loops, context rot, and goal drift. Understanding these failure modes is essential for designing robust systems, and you will see that the choice between a workflow and an agent is often a strategy for mitigating these very risks.