Solutions · AI Agents · Reasoning

Control how your agents think.

Six reasoning strategies from zero-overhead direct responses to multi-branch exploratory thinking. Match the cognitive demand of each task to the right strategy and optimize for accuracy, latency, or token cost.

6 built-in strategies One-line configuration Works with any model
Cost vs accuracy
  • None
    Fastest
  • CoT
    Low overhead
  • ReAct
    Balanced
  • Plan & Execute
    Structured
  • Reflection
    High accuracy
  • Tree of Thought
    Maximum depth
← Lower token cost Higher accuracy →
Strategy deep-dives

Six ways to think.

Each strategy controls how the agent reasons before, during, and after execution. Each card explains the strategy, when to use it, when to avoid it, and shows the exact configuration code.

1 None Direct execution Low cost

Zero overhead. The model generates a response in a single pass without any internal reasoning steps. Ideal for well-scoped, simple tasks where additional thinking would only add latency and cost.

Best for

  • Simple Q&A and lookup tasks
  • Greetings and conversational replies
  • Single-step text transformations
  • Tasks where latency is the top priority

Avoid when

  • The task requires multi-step reasoning
  • Accuracy is critical and the question is ambiguous
  • External tools or data sources are needed
2 Chain of Thought CoT Low cost

The agent "thinks out loud" before answering, breaking a problem into logical steps. Adds minimal token overhead while significantly boosting accuracy on reasoning-heavy prompts like math, logic, and multi-constraint problems.

Best for

  • Math and arithmetic problems
  • Logic puzzles and riddles
  • Multi-step decision making
  • Explaining reasoning to the user

Avoid when

  • The task is trivial and doesn't need reasoning
  • Latency matters more than accuracy
  • Responses must be extremely short
3 ReAct Reason + Act Medium costTools

The agent interleaves reasoning and action in a tight loop: think, act (call a tool), observe the result, think again. This is the go-to strategy for any task that needs external data or tool calls.

Best for

  • Research tasks requiring web search
  • Data gathering from multiple sources
  • Interactive tool calling workflows
  • Dynamic decision-making with feedback

Avoid when

  • No external tools are needed
  • The full plan is known upfront
  • Token budget is very tight
4 Plan and Execute Plan first High costTools

The agent first creates a complete, explicit plan, then executes each step sequentially. Ideal for complex, multi-phase projects where you want visibility into the overall approach before any action is taken.

Best for

  • Complex multi-phase research projects
  • Tasks that benefit from a visible roadmap
  • Orchestrating many different tools
  • Auditable, step-by-step workflows

Avoid when

  • The task is simple or single-step
  • You need fast, interactive responses
  • The plan may change dynamically mid-task
5 Reflection Self-critique Medium cost

The agent generates an initial response, then critiques it against the requirements and iterates. This produce-then-refine loop catches errors, hallucinations, and gaps that a single pass would miss.

Best for

  • High-stakes content (legal, medical, policy)
  • Complex writing where quality matters
  • Tasks with many constraints to satisfy
  • Reducing hallucination risk

Avoid when

  • Speed is more important than quality
  • The task is simple and low-stakes
  • Token budget is constrained
6 Tree of Thoughts ToT High cost

The agent explores multiple reasoning branches in parallel, evaluates each path, and selects the most promising one. Ideal for open-ended strategy problems where several approaches could be valid.

Best for

  • Strategic planning with many viable paths
  • Creative brainstorming and ideation
  • Complex decisions with trade-offs
  • Problems where the best approach is unclear

Avoid when

  • There is a single obvious solution
  • Token budget is limited
  • Speed is the primary concern
Decision matrix

Compare at a glance.

Token cost, latency profile, best-fit use case, and tool requirements side by side.

Strategy Token cost Latency Best for Tools?
None Minimal Fastest Simple Q&A, lookups, single-step tasks No
Chain of Thought Low Low Math, logic, multi-step reasoning No
ReAct Medium Medium Research, data gathering, tool workflows Yes
Plan and Execute High High Complex multi-phase projects, auditing Yes
Reflection Medium Medium High-stakes writing, compliance, accuracy No
Tree of Thoughts High High Strategy, brainstorming, trade-off analysis No
Strategy guide → PlanningStrategy enum reference →
Which strategy?

Pick the right strategy.

Walk through four quick questions to find the best fit for your task.

Question 1

Does the task require calling tools?

Yes → ReAct or Plan and Execute. No → continue.

Question 2

Does it require multi-step reasoning?

Yes → Chain of Thought. No → continue.

Question 3

Is accuracy more important than speed?

Yes → Reflection. No → continue.

Question 4

Are there multiple valid approaches?

Yes → Tree of Thoughts. Otherwise → None.

Related capabilities

Reasoning plus the rest.

Streaming & thinking tokens

Render reasoning steps live in your UI. Distinguish Thinking from Content tokens, hide or show as you choose.

Streaming page

Tools & function calling

ReAct and Plan-and-Execute strategies need tools. 70+ built-in tools, custom ITool, attribute-based [LMFunction].

Tools page

Resilience

Reasoning loops can stall. Timeout, retry, and circuit-breaker policies stop runaway agents and recover from transient failures.

Resilience page

Observability

Each Thought, Action, and Observation emits a span. Forensic analysis of why an agent picked one path over another.

Observability page

Install the SDK

Match strategy to task. Ship smarter agents.

Pick the right reasoning strategy and let your agents think at exactly the depth each task demands. Start with a single line of configuration.

Download View pricing