Agent Loop
Also known as: Agent execution loop
The runtime: LLM call → tool call → observation → LLM call → … until a final answer or step cap.
The runtime pattern of an LLM agent: model output → parse for tool calls → execute → feed results back → repeat until the model produces a final answer or hits a step limit. ReAct, function calling, and MCP all instantiate this loop.
In practice
The implementation pattern for ALL agent frameworks. Interviews probe step caps, retry policy, and observability.
How it compares
The agent loop is the runtime pattern; agents are the systems that run it.
Related topics
Questions that mention this term
- Explain the LLM vs runtime split in an agent and why the distinction matters for debugging
- Explain precisely why a chatbot with persistent memory is not an agent
- Why does LangGraph checkpointing matter for long running context engineered agents?
- Which capability is the…
- What is the primary…
- Spot the idempotency violation…
Related terms
AI Agents
LLMs that loop: plan → call tools → observe results → repeat until done.
Chain-of-Thought (CoT)
Ask the model to think step by step before answering. It boosts accuracy on reasoning tasks.
Context Rot
Long-running chats degrade: early instructions get forgotten, and tool calls become less reliable.
Function Calling
The model emits structured JSON specifying a tool call instead of free text; the host executes it.
In-Context Learning (ICL)
Show the model a few examples in the prompt and it learns the pattern, no fine-tuning needed.
Model Context Protocol (MCP)
An open protocol (from Anthropic) for letting LLMs call tools and read resources from any compatible server.