SecondBrain
Ask the Brain
Index/Conceptupdated Sat Jun 13 2026 08:00:00 GMT+0800 (Philippine Standard Time)

Agentic Loop

agentsreact-patternagentic-loopreasoningtool-use

Agentic Loop

The execution pattern that makes an LLM into an agent rather than a chatbot. Also called the ReAct patternReason, Act, observe, repeat.

The loop

  1. Task arrives (via Slack, iMessage, CLI, API, etc)
  2. Assemble context: conversation history + long-term memory + system instructions + available tools
  3. Send to LLM for reasoning
  4. Need a tool?
    • Yes → execute the tool, get result, append to context, go back to step 3
    • No → return final response
  5. Loop until no more tools needed
  6. Respond

"And that, my friends, is the core pattern behind every agent framework out there."What is OpenClaw (IBM Technology)

Where it appears in this wiki

  • OpenClaw — explicit ReAct implementation around its Gateway
  • Claude Code — same pattern, with extensions like /loop and sub-agents adding meta-loops on top
  • Blitzy — autonomous-platform variant; the loop runs entirely server-side without IDE interaction
  • Printing Press — CLIs are tools the loop can call; designed for short, clean tool outputs

A role-labeled view of the same loop (Sandeep)

You're Not Behind (Yet) Learn AI Agents (theMITmonk) gives the same mechanism with role labels instead of step labels — useful when explaining agents to non-technical audiences:

Role What it does in one pass of the loop
Analyst Finds the pattern in raw inputs
Planner Decides what matters and what to do
Operator Executes — calls tools, produces output
Auditor Checks the result, refines

The four roles aren't separate processes — they're labels for what one LLM is doing on successive passes of the ReAct loop. Useful framing for board-level / CMO explanations.

The same source contributes OODA Loop as the adversarial-speed framing layered on top of the agentic loop — ReAct is the mechanism; OODA is the bar.

Variants worth knowing

Empirical design notes — what wins (MAC, June 2026)

Meta-Agent Challenge (Autonomous Agent Development Benchmark) ran 39 (model × domain × run) configurations and qualitatively analyzed the artifacts produced by frontier meta-agents. Top-performing agentic artifacts on SWE-Bench and Terminal-Bench were minimal ReAct-style loops over a small toolset, sharing three design choices:

  1. Prompt caching on API calls to minimize per-loop latency
  2. Pre-search warming from issue symbols to populate context before the first LLM invocation (cuts wasted loops)
  3. A singular verification nudge forcing the model to verify all requirements before terminating

Notably, no top reasoning artifact used tree search or planner-worker decomposition despite their prevalence in the literature. Reasoning winners converged on parallel sampling + majority voting + prompt diversification. The empirical answer to "elaborate scaffolding vs minimal loop" is, at least for current frontier models: minimal loop wins.

Failure modes

  • Compounding errors — one bad tool result feeds the next decision; in multi-agent setups, this gets bad fast (per Agentic AI in the Enterprise (Praveen Akkiraju, CXOTalk))
  • Tool selection wrong — agent picks curl for a JS-rendered page and starts reverse-engineering Next.js (see CLI vs MCP (IBM Technology))
  • Prompt injection — untrusted tool output (web page, email) carries instructions; agent treats them as legitimate

2026-06-13 — cross-references (where the loop runs, and who pays for it)

Three threads converging on the agentic loop's economics and deployment surface:

  • Edge / on-device inference. Apple's new Siri (Apple's New Siri Bets on Google Models (Economist)) runs the loop on-device on Apple silicon, keeping personal data on the handset and sidestepping data-centre spend — the loop doesn't have to live in a hyperscaler's data centre.
  • Agents-don't-need-seats economics. The SaaSpocalypse thesis (Fear of the SaaSpocalypse (Economist)) is the business-model consequence of this page's mechanism: once the loop does the work, per-seat SaaS pricing decouples from value and consumption/token pricing takes over.
  • Assisted → agentic demand shift. The move from a human-in-the-loop assisted model to autonomous agentic execution multiplies tokens burned per task — driving the token-scarcity pressure tracked in The New Dumbest Chart in AI (AI Daily Brief) and Token Maxing. More loop iterations per outcome is the demand side of the compute squeeze.

Sources