Skip to content

Mastering Loop Engineering

An agent is "an LLM running tools in a loop." This site covers the engineering of that loop itself, designing, controlling, verifying, and evolving it, across 12 sections and 62 chapters.
  • Developers who have built an agent — ran ReAct once but want to systematically understand why loops spin forever and when to stop them
  • Engineers operating production agents — tackling cost blow-ups, context collapse, and reliability from a loop-design perspective
  • AI system designers and researchers — going beyond single-shot prompting into the principles and limits of autonomous loops, multi-agent systems, and self-improving loops

Click any card to jump to that section’s first chapter. The curriculum runs beginner (01–02) → intermediate (03–08) → advanced (09–11) → hands-on (12).

  • Cite only verifiable primary sources — arXiv, official engineering blogs (Anthropic, OpenAI, DeepMind), NeurIPS/ICLR/ICML proceedings, respected practitioner blogs. No unsourced statistics.
  • Compare alternatives in tables — trade-off-heavy topics like ReAct vs Reflexion vs Plan-Execute are laid out as tables.
  • Every chapter has a visual — at least one ASCII diagram, comparison table, or Mermaid graph to make the loop structure visible.
  • Code examples are Python-first — conceptual pseudocode; vendor-specific package names may differ from reality and are flagged as such.