Agent loop
An agent loop is the iterative cycle of observe, plan, act, and observe again that runs until the agent completes its task.
An agent loop is the core execution pattern of any autonomous system built on a language model. The model observes the current state, produces a plan, calls a tool, reads the result, and decides whether to continue or stop. Each pass is one turn of the loop.
The quality of an agent loop is a function of what it observes and what it can act on. Poor observations produce poor plans. Weak tools produce stalled actions. Good loops converge quickly on the right answer. Bad loops spin, repeat themselves, or fail on the same step forever.
Designing an agent loop means thinking about context, memory, tool quality, stop conditions, and failure recovery as a single system. Most production agent failures trace back to a loop that was built without a clear picture of what the agent should see at each turn.
The Amdahl view
Agent loops fail most often because the agent is making decisions in the dark. The fix is a customer intelligence layer that returns structured, cited meaning instead of raw data. The loop converges faster and more reliably because every observation is grounded. Amdahl treats the observation side of the loop as the first problem to solve. Tools are the second.
Frequently asked
Related terms
- AI InfrastructureTool callingTool calling is the capability that lets a language model invoke a function, API, or MCP server to fetch data or take action.
- AI InfrastructureAgent memoryAgent memory is what an agent retains across turns or sessions, split between short-term context and long-term external stores.
- AI InfrastructureContext EngineeringContext engineering is the discipline of deciding what a language model should know at inference time, including the source data, structure, and ordering of its working memory.
- The IntersectionCustomer intelligenceCustomer intelligence is the structured, queryable layer of meaning a B2B company builds from every conversation, signal, and interaction it has with buyers and customers.
- The IntersectionGTM agentA GTM agent is an AI agent that takes action on behalf of a go-to-market team, including AI SDRs, AI marketers, and AI customer success managers.
See customer intelligence running on your own customer conversations.