Section guide

Control Loops

Planning, reflection, evaluator-optimizer, and self-healing control patterns.

Use when the agent needs structured reasoning, correction, or iterative execution.

Start with Planning and Execution
Finish with Self-Healing Workflows
Reader outcome

Leave knowing when planning, reflection, optimization, or healing earns its cost.

Reusable artifact

A loop policy with budget, evaluator, failure states, recovery path, and stop rule.

Reading order

6 chapters
  1. 01
    Planning and Execution Pattern · Intermediate 12-25 min pattern review Builder · Architect

    Planning separates deciding what to do from doing it. The planner creates steps; the executor runs them, reports progress, and handles errors.

  2. 02
    ReAct Pattern · Intermediate 12-25 min pattern review Builder · Architect

    ReAct alternates reasoning and acting. The agent reasons about current state, takes an action, observes the result, and repeats.

  3. 03
    Reflection Pattern · Intermediate 12-25 min pattern review Builder · Architect

    Reflection asks an agent or evaluator to inspect prior output and identify concrete improvements.

  4. 04
    Evaluator-Optimizer Pattern · Intermediate 12-25 min pattern review Builder · Architect

    Evaluator-Optimizer pairs a generator with an evaluator. The generator proposes; the evaluator scores; the optimizer revises or stops.

  5. 05
    Self-Improvement Pattern · Intermediate 12-25 min pattern review Builder · Architect

    Self-improvement uses feedback from prior runs to improve future runs through reviewed changes to prompts, tools, retrieval, policies, tests, or skills.

  6. 06
    Self-Healing Workflows Pattern · Intermediate 12-25 min pattern review Builder · Architect

    Self-healing workflows detect failed steps and recover through retry, fallback, re-planning, or escalation.