Skip to content

Agentic Loops

Agentic Loops describe how an AI runtime repeatedly observes state, chooses an action, executes it, consumes the result, and decides whether to continue, replan, ask for help, wait, verify, or stop.

A useful mental model is:

Goal / Success Contract
        ↓
Canonical Runtime State
        ↓
Relevant Observations
        ↓
Decision / Plan
        ↓
Validated Action
        ↓
Execution
        ↓
New Observation
        ↓
Verify / Replan / Ask / Wait / Stop

The model is one probabilistic decision-making component inside the loop; the application runtime owns canonical execution state, budgets, tool execution, authorization, durable checkpoints and hard stop enforcement.

Roadmap

1. Agentic Loop Mental Model

Single call vs iterative execution, loop vs workflow, canonical runtime state, bounded autonomy and agentic islands.

Status: first detailed draft complete.

2. Goals, Tasks and Success Conditions

User intent vs execution goal, explicit success conditions, completion evidence, task decomposition, partial success and goal drift.

Status: first detailed draft complete.

3. Observation and Environment State

Authoritative environment state, timestamped observations, freshness, observe-before-act, fact vs hypothesis and normalized tool results.

Status: first detailed draft complete.

4. Decision and Action Selection

Structured next-action decisions, tool/skill selection, deterministic vs model-driven transitions, ASK/WAIT/REPLAN/STOP outcomes and action validation.

Status: first detailed draft complete.

5. Planning and Task Decomposition

Plan-first vs reactive execution, short-horizon planning, explicit dependencies, typed plans, plan invalidation and evidence-driven replanning.

Status: first detailed draft complete.

6. Execution State and Scratchpad

Canonical run state, context projection, intermediate artifacts, checkpoints, resume, state versioning and observation-vs-hypothesis separation.

Status: first detailed draft complete.

7. Stop Conditions and Execution Budgets

Success/failure/cancellation states, multidimensional budgets, hard vs soft limits, no-progress detection and nested-run budget control.

Status: first detailed draft complete.

8. Failure Recovery, Retry and Replanning

Failure taxonomy, retry vs repair vs re-observe vs replan, idempotency, reconciliation, fallback and repeated-failure detection.

Status: first detailed draft complete.

9. Reflection, Verification and Critique

Self-reflection vs evidence-backed verification, deterministic/external verifiers, critic patterns and bounded generate-verify-repair loops.

Status: first detailed draft complete.

10. Human-in-the-Loop and Approval Gates

Clarification, review, approval, escalation, scoped/expiring approvals, pause/resume and risk-based autonomy.

Status: first detailed draft complete.

11. Loop Patterns and Control Strategies

Observe/act, plan-execute, planner/executor, generate-verify-repair, supervisor/workers, event-driven runs and deterministic workflows with agentic islands.

Status: first detailed draft complete.

12. Loop Evaluation, Observability and Anti-patterns

Outcome and trajectory evaluation, traces, metrics, failure injection, regression gates and anti-patterns such as loop explosion, tool roulette and endless reflection.

Status: first detailed draft complete.

Learning order

  • 1. Agentic Loop Mental Model — first detailed draft
  • 2. Goals, Tasks and Success Conditions — first detailed draft
  • 3. Observation and Environment State — first detailed draft
  • 4. Decision and Action Selection — first detailed draft
  • 5. Planning and Task Decomposition — first detailed draft
  • 6. Execution State and Scratchpad — first detailed draft
  • 7. Stop Conditions and Execution Budgets — first detailed draft
  • 8. Failure Recovery, Retry and Replanning — first detailed draft
  • 9. Reflection, Verification and Critique — first detailed draft
  • 10. Human-in-the-Loop and Approval Gates — first detailed draft
  • 11. Loop Patterns and Control Strategies — first detailed draft
  • 12. Loop Evaluation, Observability and Anti-patterns — first detailed draft

Core engineering boundary

The full workstream converges on this model:

Probabilistic decision
        inside
Deterministic runtime control

The runtime should own:

  • authoritative execution state,
  • success/failure contracts,
  • budgets and stop conditions,
  • authorization and approval gates,
  • tool execution and side-effect safety,
  • retry/idempotency policy,
  • checkpoints and resumability,
  • observability and audit.

The model should be used where semantic reasoning, planning, interpretation or next-action selection adds value.

Completion state

The Agentic Loops workstream is complete at first-draft depth. Future updates should refine the chapters through questions, implementation experience and evaluation rather than extend the roadmap linearly.

Next step

Move to Agent Architecture, starting with topics 1–4: mental model, application structure in the AI era, core runtime/orchestrator and context architecture.