AI Agent Interview Essentials: The Fundamental Difference Between Workflow and ReAct

ReAct handles what to do next; Workflow handles how to reliably finish—use Workflow for long-running business flows with ReAct embedded locally.
This article addresses the high-frequency interview question of why Agent orchestration uses Workflow rather than pure ReAct. It explains that ReAct's Thought-Action-Observation loop is flexible but keeps state implicit in the model context and process, making recovery after interruption unreliable and risking duplicate inventory deductions. Workflow behaves like a pipeline with an execution log, explicitly recording and persisting each node's state, so it wins on state management, determinism, fault tolerance, and observability. The two are complementary: ReAct suits exploratory tasks, Workflow suits strongly consistent long flows, and production practice often embeds ReAct inside Workflow nodes.
Many people preparing for AI Agent interviews habitually memorize API usage and terminology definitions, but what interviewers really want to hear is your understanding of the underlying mechanisms. In a video, Bilibili creator Peng Yu points out directly: if you can only run demos and have memorized a pile of terms but can't connect the underlying logic, you'll be exposed as soon as they dig deeper. This article focuses on a high-frequency interview question he discussed—why Agent task orchestration uses Workflow instead of just letting the Agent run pure ReAct—and breaks down the underlying differences between the two approaches.
Remember One Core Conclusion First
Peng Yu gives a crisp conclusion: ReAct solves "what to do next," while Workflow solves "how to reliably finish this task."
This sentence is the root of all the differences that follow. Many people's answers stop at "Workflow is more stable, ReAct is more flexible," which is only a passing grade for a conceptual question—interviewers won't give high marks. What really sets candidates apart is whether they can clearly explain who is in charge during task execution in each approach, how state is managed, and how failures are handled.

ReAct's Flexibility and Its Cost
ReAct's pattern is a "Thought—Action—Observation" loop: the LLM first reasons, then calls a tool, and after getting the result decides the next step based on that result. This pattern is great for prototyping and demos—you can build a working Agent in half a day, steps don't need to be hard-coded in advance, and the model can decide on the fly whether to call a search engine, query a database, or call a business API.
The problem shows up in real business scenarios. Peng Yu gives a very concrete example: a user buys a computer, and the complete transaction flow has five steps—check inventory, create order, deduct inventory, initiate payment, and wait for the payment platform callback. Suppose the first three steps succeed and inventory has already been deducted, but the payment service goes down when calling the payment API in step four. After the task restarts, should it re-run from step one or continue from step four? If it runs from the beginning, will inventory be deducted again? If it continues directly, what evidence do you use to know which step was reached?

This is the fatal problem that pure ReAct most easily exposes in production scenarios: a large amount of runtime state depends on the model's context and the current execution process—it is implicit state. Once the task is interrupted, the service restarts, or the context exceeds its limit, it is very difficult to guarantee precise recovery of every step, and business incidents such as duplicate execution and state corruption are very likely.
ReAct (Reasoning + Acting) was proposed by Shunyu Yao et al. in 2022. Its core is to alternate the LLM's reasoning ability with external tool calls: the model first outputs a Thought, then decides on an Action, and after receiving the Observation returned by the tool, proceeds to the next round. Compared with prompting that generates a complete answer in one shot, ReAct lets the model dynamically correct its route based on external feedback, so it performs better on tasks that require retrieval, computation, or API calls. But it is essentially still a prompting strategy: the model's decision in each round is built on the complete prior conversation history, and the so-called "state" is just text in the context window. This explains why it is flexible, and also why it is fragile: once the context is truncated or the process is interrupted, the model cannot reconstruct the exact execution progress on its own and can only rely on re-reasoning—and the result of re-reasoning may not match the previous one.
Workflow's Four Underlying Advantages
A Workflow can be understood as a pipeline with an execution log: every time it passes through a node, it records whether this step started, whether it succeeded or failed, what the output was, and which node to jump to next. Even if the service happens to crash at step four, after a restart it can simply resume from the persisted state—there is no need to make the model recall where it left off.

Peng Yu summarizes the differences between the two into four dimensions:
State Management
Workflow has explicit state: each node's execution result, inputs, and outputs are clearly recorded and can be persisted; ReAct relies more on implicit state in the model's context—the state lives in the conversation and is hard to trace once broken.
The difference between explicit and implicit state can be compared to the difference between a database and in-memory variables. Explicit state means the system writes execution progress as structured data (such as node IDs, status codes, and input/output snapshots) into persistent storage; any process can read it and continue execution accordingly. This requires a state machine or workflow engine to clearly define the transition conditions for each node. Implicit state exists in runtime memory or the model's conversation context—only the current process or the current reasoning round "knows" which step has been reached. The former can recover across restarts and across instances, and is easy to audit and replay; for the latter, once the process carrying it disappears, the state disappears with it. In engineering, the key to judging whether a system can reliably recover is whether its state is serializable, persistable, and replayable.
Execution Determinism
Workflow's branching logic is defined in advance: if condition A is met, take path B; if condition C is met, take branch D. The execution path is predictable and controllable. In ReAct, which tool to call next and what logic to follow is largely determined dynamically by the LLM. It is more flexible but inherently probabilistic—the same input may produce completely different execution processes.
Fault Tolerance
Workflow can explicitly configure rules: how many times to automatically retry on failure, how long counts as a timeout, what compensation logic to trigger after failure, and even where to stop and wait for human review. In an order scenario where inventory has been deducted but payment fails, Workflow can directly trigger a compensation process to release the inventory. This capability is essential in strongly consistent businesses such as order payment and approval.
Compensating Transaction is a classic concept in distributed transactions. It means that when a later step fails, a reverse operation is executed to offset the operations already completed earlier, bringing the business back to a consistent state. It differs from a database rollback: rollback relies on transaction isolation, whereas compensation is a post-hoc correction for operations that have already taken effect externally—for example, adding inventory back after it has been deducted, or marking a created order as canceled. In long-running business processes, because multiple external services and asynchronous callbacks are involved, it is impossible to wrap all steps in a single database transaction, so compensation becomes the primary means of ensuring eventual consistency. Workflow engines usually declare retry policies, timeout thresholds, and compensation nodes explicitly as part of the process definition, whereas in ReAct mode you can only hope the model "remembers" to remediate during reasoning—the reliability is not in the same league.
Observability
When a Workflow fails, you can usually pinpoint exactly which step went wrong, how many retries occurred, how long it took, and what the inputs and outputs were. Once a complex ReAct Agent goes off track, you often can only see how many rounds of reasoning the model did before the task ultimately failed—the difficulty of troubleshooting is on a completely different level.

Don't Say "Workflow Is Better Than ReAct" in Interviews
This is something Peng Yu specifically warns about: saying Workflow is better than ReAct is also wrong. The two are not substitutes where one replaces the other at all—their applicable scenarios are completely different.
Information lookup, Q&A assistants, simple automation, and exploratory tasks—where the steps themselves are uncertain—are very suitable for ReAct. But long-process businesses involving order payment, credit approval, data ETL, third-party callbacks, and human review require recoverability, traceability, auditability, and intervenability, and Workflow is the core workhorse there.
In real engineering practice, the two are often used together: Workflow governs the entire main process to ensure overall business reliability, while inside a specific node, ReAct is used for dynamic decision-making to retain flexibility.
A typical form of combining the two is "outer orchestration, inner autonomy": the main process is defined by Workflow as ordered nodes responsible for state persistence, branch decisions, failure retries, and human review checkpoints; inside a node that requires dynamic decision-making (for example, determining user intent, choosing which retrieval source to call, or generating response content), a ReAct loop is embedded so the model can explore autonomously. The benefit of this layering is that uncontrollable model decisions are confined within the boundary of a single node; externally, the node still appears as a deterministic step with clear inputs and outputs, and the recoverability and observability of the overall process are unaffected.
Conclusion
The core difference between Workflow and ReAct is never as superficial as "one is fixed and the other is flexible." ReAct centers on the LLM's dynamic decision-making and is suitable for short-lived, low-risk, exploratory tasks; Workflow centers on explicit state and deterministic control flow, supports state persistence, and values timeouts, compensation, monitoring, and human intervention, making it more suitable for production-grade core businesses. Once you can explain this logic clearly, deep-dive questions about Agent fundamentals will no longer be where you get stuck.
One-line Summary
ReAct handles what to do next; Workflow handles how to reliably finish—long-running business processes should be Workflow-driven with ReAct embedded locally.
Paragraph Summary
The article centers on the high-frequency interview question "why Agent task orchestration uses Workflow instead of pure ReAct." It points out that ReAct is driven by a "Thought—Action—Observation" loop: flexible, but its state implicitly lives in the model context and execution process, making precise recovery difficult after interruption and easily leading to incidents such as duplicate inventory deduction. Workflow is like a pipeline with an execution log, where each node's state is explicitly recorded and can be persisted; it is better suited to production-grade long-running business processes across state management, execution determinism, fault tolerance, and observability. The author emphasizes that the two are not substitutes: exploratory tasks with uncertain steps suit ReAct, while strongly consistent scenarios such as order payment, approval, and ETL should be Workflow-driven. In engineering practice, ReAct is often embedded inside Workflow nodes to balance flexibility.
Related articles

Did Anthropic's Research Actually Break Encryption? PQC and Quantum Key Fusion Emerges as the Trend
Anthropic's new research did not actually break current cryptography but uses AI to accelerate quantum attack algorithm verification. This article analyzes PQC lattice cryptography performance advantages, the divergent triple-hardening paths between China and the U.S., and the industry pilots and standards implementation pace under PQC and quantum key fusion.

Getting Started with AI Agent Development: The Four-Component Loop That Takes AI from Chatting to Doing
What's the real difference between a chatbot and an Agent that gets things done? This article breaks down the one-sentence definition of an Agent, the four components (model/tools/memory/planning), clears up the common misconception that "the model only comes up with ideas—the code does the work," and offers practical criteria for judging whether a task is worth building into an Agent.

Understand 58 AI Terms in One Go: From Large Models to Agents, MCP, and Skills
A video walkthrough of 58 AI terms: from AI, machine learning, and large models to Token, pre-training, RAG, tool calling, Agent, MCP, Skill, and Harness.