Agentic AI · Reasoning Systems

How agents think
before they act.

Even a skilled model must have the ability to dissect a goal into smaller tasks, evaluate different strategies, and identify errors in execution. These reasoning patterns, such as Chain-of-Thought, ReAct, Reflexion, Tree of Thoughts, and Plan-and-Execute, are what enable agents to possess such capabilities.

SLIDE 01 : AGENT PLANNING & REASONING Cover slide: Agent Planning and Reasoning
Quick answer

Agent planning and reasoning The foundational layer consists of techniques that enable an AI agent to break down a goal, determine the next steps, and adjust course if necessary, rather than providing a single automatic response. Chain-of-Thought In addition, there are four active production patterns sitting on top of that. These patterns are currently being utilized. ReAct (interleave reasoning with tool actions), Reflexion (self-critique and retry), Tree of Thoughts (explore multiple reasoning paths, not just one), and Plan-and-Execute / ReWOO When committing to a full plan upfront, most production planners rely on one of five strategies: task decomposition, multi-plan selection, external module-aided planning, reflection and refinement, or memory-augmented planning.

SLIDE 02 : THE REASONING ENGINE Diagram of an agent's reasoning engine: planner, tool calling, and decision loop
What powers planning and acting

Two phases, one engine

Beneath each agentic workflow lies a reasoning engine responsible for two tasks. Planning breaks down an open-ended objective into a series of smaller, manageable logical steps. Tool calling Every step is carefully validated, whether it involves fact-checking, querying, or utilizing an API, to ensure that the agent's subsequent decisions are based on concrete information rather than mere speculation.

On straightforward tasks, a detailed planning stage may not be needed. Instead, an agent can continuously evaluate and enhance a response without formal planning. Planning becomes essential for tasks with intricate decision-making processes, such as multiple viable strategies, interdependent steps, or a risk of errors.

The foundational layer

Every pattern here builds on one idea

Chain-of-Thought serves as the foundational reasoning baseline. While subsequent patterns may incorporate action, reflection, branching, or upfront commitment, they do not supplant it.

SLIDE 03 : CHAIN-OF-THOUGHT (COT) Chain-of-Thought reasoning: single-path step-by-step decomposition
Single-path, step-by-step

Thinking out loud, one step at a time

Chain-of-Thought prompting requires the model to display its step-by-step reasoning process leading to an answer, without skipping ahead. It solely relies on reasoning, breaking down the problem into a series of smaller logical steps with no outside assistance.

It significantly enhances multi-step reasoning and decomposition, explaining why it is a crucial component in nearly every advanced agent pattern instead of being substituted by other methods.

SLIDE 04 : REACT: REASON + ACT ReAct pattern: interleaving Thought, Action, and Observation
The default agent loop

Thought, Action, Observation : repeat

ReAct connects logic to tool utilization by having the agent think, act, observe, and incorporate feedback in a continuous loop of Thought → Action → Observation until completion.

As each intermediate decision is documented, the entire trajectory is open to inspection and audit. This transparency is a key reason why ReAct has become the standard pattern in production agent frameworks: it combines adaptability with a logical trail that can be verified. However, its primary drawback is a tendency to get stuck in loops, where the same actions and thoughts are repeated without making any real advancement if the model cannot find a new perspective.

Underneath every pattern

Five planning strategies, one dedicated step

The majority of agent architectures include a clear planning phase that utilizes one or more of these five strategies prior to carrying out any actions.

SLIDE 05 : FIVE PLANNING STRATEGIES Five planning strategies for AI agents
Pick a strategy on purpose

Different problems call for different planners

Production planners often combine two or three of these strategies for more challenging tasks, as they are not mutually exclusive.

01
Task decomposition

Divide a goal into smaller, sequential tasks that can be addressed individually.

02
Multi-plan selection

Create multiple potential plans and select the most robust one prior to implementation.

03
External module-aided

Rely on a specialized planning module or solver in addition to the LLM.

04
Reflection & refinement

Modify a plan during the course of action due to updated information or a discovered error.

05
Memory-augmented

Utilize past experiences to shape the development of the current plan.

SLIDE 06 : REFLEXION: SELF-REFLECTION Reflexion pattern: self-critique and retry loop
Learning from the last attempt

Fail, critique yourself, try again

Reflexion enhances a reasoning pattern, such as ReAct, by incorporating a self-reflection loop. Following each attempt, the agent provides a verbal critique of errors made, such as hitting a dead end or making incorrect assumptions. This critique is carried forward into the next attempt, preventing the repetition of mistakes.

The benefits of using Reflexion in coding benchmarks are remarkable, as models have shown significant increases in pass rates that exceed their own baseline performance solely due to the reflection step, not a stronger underlying model.

SLIDE 07 : TREE OF THOUGHTS (TOT) Tree of Thoughts: multi-path reasoning exploring several branches
Multi-path, not single-path

Explore several thoughts, keep the best

Chain-of-Thoughts sticks to one path of reasoning, while Tree of Thoughts delves into multiple branches simultaneously, considering numerous potential next thoughts and eliminating unpromising ones to delve further into the remaining branches.

The extra compute required justifies its use in situations where correcting a wrong turn early on is costly, such as in puzzles, intricate planning scenarios, or any task where backtracking results in wasted time.

SLIDE 08 : PLAN-AND-EXECUTE / REWOO Plan-and-Execute and ReWOO: planning upfront instead of interleaved
Commit to the plan, then run it

Plan once, execute without pausing

ReWOO ('Reasoning WithOut Observation') differs from ReAct by planning the entire sequence of actions upfront and executing them without pausing to re-reason after each tool response, rather than interleaving thought and tool call at every step.

Breaking down the task into subtasks, executing them using real tools, and synthesizing the results into a final answer is the process followed by the planner, worker, and solver modules. While this approach can outperform ReAct on specific benchmarks and reduce the number of repeated tool calls, it comes with a downside. The fixed plan may struggle in situations where the environment lacks the expected context or when additional tools are introduced that were not accounted for in the initial plan.

How they actually stack up

Every pattern trades something for something

No one pattern excels in all areas - cost, reliability, and interpretability each have their own priorities.

SLIDE 09 : PATTERN TRADE-OFFS Benchmark comparison of reasoning patterns: CoT, ReAct, Reflexion, ToT
Reading the trade-off table

Pick based on the failure you fear most

If you struggle with hallucinations during knowledge-heavy tasks, ReAct's reliance on real tool observations can be beneficial. If you tend to provide brittle one-shot answers for tasks with checkable outcomes, such as passing or failing code, Reflexion's self-critique loop may be worth the slight delay. If you are concerned about committing too early to a wrong approach, Tree of Thoughts' exploration of multiple branches can be valuable despite the increased computational requirements.

PatternCore mechanismStrengthMain cost or risk
Chain-of-ThoughtSingle-path step-by-step reasoningCheap, fastNo grounding, no correction
ReActInterleaved thought → action → observationInspectable, groundedCan loop without progress
ReflexionSelf-critique after each attemptLearns from failureExtra latency per retry
Tree of ThoughtsExplore and prune multiple branchesAvoids early wrong turnsHigher compute cost
Plan-and-Execute / ReWOOPlan upfront, then execute without pausingFewer redundant tool callsBrittle to unplanned surprises
SLIDE 10 : BRINGING IT TOGETHER Summary: combining reasoning patterns in a Perception-Reasoning-Action-Reflection loop
The patterns rarely work alone

One loop, several patterns nested inside

These patterns often overlap, with production systems typically utilizing more than one. A popular pairing includes Reflexion and ReAct for adaptive, self-correcting behavior during lengthy tasks, or Plan-and-Execute with Tree of Thoughts for complex problems requiring both structure and flexibility.

The same fundamental loop guides them all: observe, think, act, and review before observing again. The key difference between a dependable agent and a flashy demo lies in the reasoning pattern chosen for each step in the loop.

Frequently asked

Agent planning & reasoning FAQ

Chain-of-Thought relies solely on reasoning, while ReAct incorporates action into the process. The agent interchanges between reasoning and implementing a tool, observing the tangible outcome before proceeding to the next thought. This approach provides a more dependable foundation for reasoning than relying solely on the model's assumptions.

Opt for Tree of Thoughts in situations where a mistake early on can be difficult to rectify, such as puzzles, complex planning with dependencies, or problems with multiple viable solutions. This method requires more computational resources as it explores various branches, making it unsuitable for straightforward tasks where Chain-of-Thought is sufficient.

After a failed attempt, reflection prompts the agent to write out a self-critique, identifying what went wrong in their own words. This feedback is then used to inform future attempts, especially beneficial for tasks with measurable outcomes like passing or failing code tests.

When the model relies on the same observation for each new thought, it can get stuck in a loop of regenerating similar thoughts and actions without moving forward. Adding a reflection step or hard step limit can help prevent this issue when using ReAct.

ReWOO carefully maps out a series of actions in advance and follows through without pausing to reevaluate after each tool response, in contrast to ReAct which alternates between reasoning and action at every turn. While this approach minimizes unnecessary tool calls and can excel in certain tests, it is less adaptable to unexpected environmental changes that were not accounted for in the initial plan.

Infrequently, production systems typically integrate various patterns such as Reflexion paired with ReAct for adaptive self-correction, or Plan-and-Execute mixed with Tree of Thoughts for long-term issues requiring both organization and exploration. These patterns serve as fundamental components within a larger perceive-reason-act-reflect loop, rather than being mutually exclusive alternatives.

Get started

Ready to choose a reasoning pattern for your agent?

Begin by identifying the failure mode that concerns you the most - whether it be hallucination, brittle one-shot answers, or early wrong turns - and allow that to dictate the pattern, rather than the other way around.