The Agentic Loop: Three loops in a trench coat

bobbytables.io
July 14, 2026
6 min read
49/100
Summary
Agent loops consist of three distinct components rather than a single loop, creating a more complex "agentic" experience for users. The discussion includes examples of pseudo-code to illustrate these concepts.
Key Takeaways
- The agentic experience for customers is composed of three distinct loops: the inference loop, the tool loop, and an unspecified third loop.
- The inference loop is responsible for making chat completion API calls, managing chat history, and passing tool usage requests.
- Large Language Models (LLMs) operate on a stateless design, requiring the entire conversation context to be sent with each API request.
- The tool loop enables LLMs to utilize external tools, enhancing their functionality beyond mere text generation.
Coverage & discussions
Hacker News · bobbytables.io
Community discussions
Community Sentiment
Positives
- The pattern of three loops is a compelling framework that could help clarify the interaction between human input and AI processes.
- Commenters are actively engaging with the concept, indicating a thriving interest in refining AI models and their architectures.
Concerns
- There's skepticism about the effectiveness of these loops for complex tasks, with one commenter noting that agents often reward hacks instead of delivering generalized solutions.
- Concerns about the loops being misrepresented in the diagram highlight a lack of consensus on the model's structure and functionality.
Related Articles

Levels of Agentic Engineering
Mar 10, 2026

When everyone has AI and the company still learns nothing
May 5, 2026

My AI Adoption Journey
Feb 5, 2026
What years of production-grade concurrency teaches us about building AI agents
Feb 18, 2026

Why Software Factories Fail (or: harness engineering is not enough)
Jul 23, 2026