ReAct
Alternates reasoning and action. It is easy to trace and works well when the next step depends on tool output.
AI Agent Tutorial
A production agent should use the simplest reasoning loop that reliably completes the task. This guide compares four common patterns and shows when each one earns its added complexity.
Use ReAct for short tool-driven tasks, Plan-and-Execute for multi-step workflows, Reflexion when iterative self-correction is measurable, and Tree-of-Thought only when branching search materially improves solution quality.
Use these dimensions to make the architecture decision explicit and testable.
Alternates reasoning and action. It is easy to trace and works well when the next step depends on tool output.
Creates an explicit plan, runs the steps, and revises the plan when evidence changes. It suits long workflows with dependencies.
Adds a feedback loop that critiques prior attempts and stores lessons. It is useful only when feedback is reliable and reusable.
Explores several candidate reasoning paths before selecting one. It can improve difficult search problems but multiplies cost and latency.
Use these dimensions to make the architecture decision explicit and testable.
Short tasks rarely need a planner. Long workflows benefit from explicit state and checkpoints.
When tools return ambiguous or partial evidence, use a pattern that can revise the next step.
Branching and repeated critique increase model calls. Set a budget before enabling them.
Regulated workflows need visible plans, tool logs, approvals, and stop conditions.
Use these dimensions to make the architecture decision explicit and testable.
Persist goals, intermediate evidence, decisions, and unresolved questions separately from the chat transcript.
Define success, failure, timeout, and escalation conditions. Do not let the model decide indefinitely.
Measure task success, unsupported actions, tool-call accuracy, cost, latency, and recovery after an error.
Restrict tools by role, validate parameters, sandbox risky operations, and require approval for irreversible actions.
Use this as a design-review gate before release.
Place this pattern inside a broader agent architecture and operating model.
Browse memory, planning, frameworks, reliability, safety, and observability.
Open the tutorial library →Start with agent features, design patterns, benefits, challenges, and industry applications.
Open the guide →