AI Agent Reasoning: ReAct vs Plan-Execute vs Tree-of-Thought
Compare agent reasoning patterns - ReAct, plan and execute, tree of thoughts, and Reflexion - and learn which to pick for reliability, latency, and cost.
The single biggest driver of whether an AI agent feels reliable or flaky is not the model - it is the agent reasoning pattern you wrap around it. The reasoning pattern is the control loop that decides how the agent thinks, when it acts, and how it recovers from a wrong turn. Get it right and a mid-tier model behaves dependably. Get it wrong and even a frontier model loops, wanders, or burns tokens on work it did not need to do.
This guide walks through the five agent reasoning patterns that matter in production - Chain-of-Thought, ReAct, plan and execute, tree of thoughts, and Reflexion - explains how each one works, and gives you a decision table for picking the right one. The short version: every choice is a trade-off between reliability, latency, and cost, where cost is mostly measured in the number of LLM calls.
What is an agent reasoning pattern?
An agent reasoning pattern is the strategy that structures how an agent moves from a goal to a finished result. It answers three questions: how does the agent break down the problem, when does it call tools or take actions, and what does it do when a step fails?
If you are new to the broader topic, our primer on what AI agents are covers the building blocks - model, tools, memory, and loop. Reasoning patterns are specifically about that loop: the single-agent brain. When you need several brains working together, that is multi-agent orchestration, which coordinates multiple reasoning agents rather than replacing the pattern inside each one.
Every pattern below trades three things against each other:
- Reliability - how often the agent reaches a correct result.
- Latency - how long the user waits.
- Cost - how many LLM calls and tokens you spend, which drives your bill.
Patterns like tree of thoughts buy reliability with far more LLM calls. Others, like plan and execute, buy structure while spending fewer thinking-loop calls. There is no free lunch, only the right trade for your task.
Chain-of-Thought: the foundation
Chain-of-Thought (CoT) prompts the model to reason step by step in plain text before it commits to an answer. Instead of jumping straight to a conclusion, the model writes out intermediate steps, which sharply improves multi-step reasoning like math, logic, and analysis.
CoT is the foundation every other pattern builds on, but on its own it has a hard limit: there are no tools and no actions. The model reasons purely from what it already knows, so it cannot look anything up, run code, or check its work against the real world.
One useful extension is Self-Consistency: sample several independent CoT paths for the same question and take the majority-vote answer. This raises reliability on hard reasoning problems, but it multiplies your LLM calls - you pay for every sampled path. That cost multiplier is a theme you will see again with tree of thoughts.
Use plain Chain-of-Thought when you need a single-shot answer to a reasoning question and no external data or tools are involved.
ReAct: reason plus act
ReAct stands for Reason plus Act, and it is the default pattern for tool-using agents. It interleaves reasoning with actions in a loop: the agent produces a thought, takes an action (a tool call), reads the observation (the tool result), then reasons again - repeating until it decides the task is done.
Thought: I need the customer's latest invoice total.
Action: lookup_invoice(customer_id="8821")
Observation: { "total": 4200, "status": "overdue" }
Thought: It is overdue, so I should draft a reminder.
Action: ...
The power of ReAct is that every reasoning step is grounded in a real observation rather than the model’s guess. That grounding is why ReAct reduces hallucination - the agent reacts to what the tools actually return instead of inventing facts.
The weakness: on hard tasks a ReAct loop can wander or get stuck in a loop, repeating similar actions without converging. And because each thought-action-observation cycle is a separate LLM call, long trajectories get slow and expensive. Guard against this with step limits, loop detection, and clear tool descriptions.
Use ReAct as your general default whenever the agent needs tools - search, database queries, APIs, code execution.
Plan-and-Execute (and ReWOO)
Plan-and-Execute flips the order. Instead of thinking one step at a time, the agent plans the whole multi-step approach up front, then executes each step in sequence. If a step fails, a good implementation re-plans from the current state rather than blindly continuing.
This gives you two advantages over a pure ReAct loop. First, clearer structure - you get an explicit plan you can inspect, log, and debug. Second, fewer LLM calls in the thinking loop, because the expensive reasoning happens once at planning time rather than at every step. That structure makes it a strong fit for complex multi-step tasks where the shape of the work is knowable in advance.
The weakness is the mirror image of the strength: a bad initial plan propagates through every downstream step unless you re-plan. Planning quality becomes your bottleneck.
A notable variant is ReWOO (Reasoning Without Observation), which plans all the tool calls in a single pass, executes them, and only then reasons over the combined results. By separating planning from execution it cuts token use and avoids re-feeding the full history into the model at every step.
| ReAct | Plan-and-Execute | ReWOO | |
|---|---|---|---|
| When it thinks | Every step | Once up front, re-plans on failure | Once up front |
| Grounding | Strong (observes each result) | Weaker (plan set early) | Weakest (defers observation) |
| LLM calls | High | Lower | Lowest |
| Best for | Tool use, exploration | Structured multi-step tasks | Token-sensitive workloads |
Use Plan-and-Execute when the task is a complex, multi-step job you want structured and cheaper on thinking calls - and reach for ReWOO when you specifically need to save tokens.
Tree-of-Thoughts: deliberate search
Tree-of-Thoughts (ToT) treats reasoning as a search problem. Rather than following one linear chain, the agent generates multiple reasoning branches, evaluates how promising each one looks, and searches through them (breadth-first or depth-first) to find the best path. It can backtrack when a branch turns out to be a dead end.
This is deliberate problem solving, and it is the right tool when a single chain of thought reliably fails: puzzles, planning problems, and search problems with many possible moves and a way to score partial progress. Where CoT commits to its first line of reasoning, ToT explores alternatives before committing.
The cost is steep. Exploring and evaluating many branches means many LLM calls, which makes ToT slow and expensive - and complete overkill for simple tasks. If a plain CoT or a short ReAct loop solves your problem, ToT is the wrong tool.
A generalization worth knowing is Graph-of-Thoughts, which extends the tree into a graph so branches can merge and reasoning steps can be combined rather than only split. It is more flexible than ToT for problems where partial solutions recombine.
Use Tree-of-Thoughts only for genuine search, planning, and puzzle problems where linear reasoning is not enough and you can afford the extra calls.
Reflexion and self-reflection
Reflexion adds a feedback loop across attempts. After an attempt - especially a failed one - the agent critiques its own output, writes down what went wrong, keeps that lesson in memory, and retries with the critique in context. It is iterative self-improvement: attempt, reflect, retry, improve.
Reflexion works best when there is a success signal the agent can iterate against - a unit test that passes or fails, a verifier, a compiler error, a validation check. That signal tells the agent whether its last attempt actually worked, which is what makes the reflection meaningful rather than guesswork.
The weakness is straightforward: extra iterations cost time and tokens. Each retry is another full pass, so you cap the number of attempts and stop as soon as the success signal fires.
Use Reflexion for tasks with a clear pass/fail signal you can loop against, such as code generation, data extraction with validation, or anything with automated tests.
A note on modern reasoning models
One shift worth flagging: reasoning models with built-in chain-of-thought change the calculus. When the model already reasons internally before answering, you often need less explicit scaffolding in your prompts and control loop. Some of the work CoT and even light ToT used to do by hand now happens inside the model. That does not remove the need for ReAct-style tool loops or Plan-and-Execute structure, but it does mean you should re-test whether heavy manual reasoning scaffolds still earn their cost on newer models.
How do you combine reasoning patterns?
Real agents rarely use one pattern in isolation - they compose them. Common combinations:
- A ReAct loop whose steps come from a Plan-and-Execute plan - the plan sets the overall structure, and each step runs a grounded thought-action-observation cycle.
- Reflexion wrapped around any pattern - if the trajectory fails a check, the agent reflects and retries the plan or the step.
- Tree-of-Thoughts inside a single hard step of an otherwise linear plan, where that one step genuinely needs search.
The mental model: reasoning patterns are the single-agent brain, and you can layer them inside one agent. When one brain is not enough and you need specialists handing off to each other, that is where multi-agent orchestration takes over, coordinating several such brains.
Which reasoning pattern should you use?
Match the pattern to the task and watch your call budget. This decision table sums it up:
| Your situation | Use this pattern | Cost / latency | Watch out for |
|---|---|---|---|
| Simple single-shot answer, no tools | Plain Chain-of-Thought (or nothing) | Lowest | Overthinking easy questions |
| Higher reliability on a hard reasoning question | Self-Consistency (sampled CoT) | Higher (multiplies calls) | Cost multiplier |
| Tool-using agent, general default | ReAct | Medium to high | Looping and wandering |
| Complex multi-step task, want structure and fewer thinking calls | Plan-and-Execute (or ReWOO to save tokens) | Lower thinking-loop calls | Bad plan propagates |
| Search, planning, or puzzle problem | Tree-of-Thoughts | Highest (many calls) | Overkill for simple tasks |
| Task with a pass/fail success signal | Reflexion | Extra iterations | Retry cost, cap attempts |
Two rules keep you honest. First, watch cost: Tree-of-Thoughts and Self-Consistency multiply LLM calls, so if your bill is climbing, our guide on how to cut LLM costs for chatbots and agents is required reading. Second, you cannot choose a pattern from theory alone - you must evaluate the trajectory on your real tasks to learn which one actually wins. Our walkthrough on how to evaluate and test AI agents shows how to measure success rate, calls, latency, and cost head to head.
Picking the right reasoning pattern is where dependable agents are won or lost. If you want help designing the loop, tools, and guardrails behind a production agent that stays reliable and affordable, our AI agent development team does exactly this - talk to us about your use case.
Frequently Asked Questions
What is an agent reasoning pattern?
An agent reasoning pattern is the control loop that governs how an agent thinks, takes actions, and recovers from mistakes. It defines whether the model reasons step by step, calls tools between thoughts, plans everything up front, or explores multiple branches. Choosing one is a trade-off between reliability, latency, and cost measured in LLM calls.
Is ReAct better than Plan-and-Execute?
Neither is strictly better. ReAct is the best default for tool-using agents because it grounds each step in real observations, but it can loop or wander on hard tasks. Plan-and-Execute gives clearer structure and fewer thinking-loop calls for complex multi-step tasks, but a bad initial plan propagates unless you re-plan. Many production agents blend the two.
When should I use Tree-of-Thoughts?
Use Tree-of-Thoughts for search, planning, and puzzle problems where a single linear chain fails and you need to explore and evaluate multiple branches. It is powerful but expensive because it multiplies LLM calls, so it is overkill for simple lookups or straightforward tool use.
What is the difference between ReAct and Chain-of-Thought?
Chain-of-Thought makes the model reason step by step in text before answering, with no tools or external actions. ReAct adds an action loop on top - the agent interleaves reasoning, tool calls, and observations so its thinking stays grounded in real results rather than pure text prediction.
How do I know which reasoning pattern works best?
You have to evaluate the trajectory, not just the final answer. Measure success rate, number of LLM calls, latency, and token cost across your real tasks, then compare patterns head to head. A pattern that wins on a benchmark can lose on your workload, so testing on your own data is the only reliable signal.
Complementary NomadX Services
Related Articles
Get Started for Free
Schedule a free consultation with our AI agents team. 30-minute call, actionable results in days.
Talk to an Expert