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
Related terms
Prompt Engineering
Crafting the input text so the model produces the behavior you want.
AI Agents
LLMs that loop: plan → call tools → observe results → repeat until done.
Model Context Protocol (MCP)
An open protocol (from Anthropic) for letting LLMs call tools and read resources from any compatible server.
Chain-of-Thought (CoT)
Ask the model to think step by step before answering. It boosts accuracy on reasoning tasks.
In-Context Learning (ICL)
Show the model a few examples in the prompt and it learns the pattern, no fine-tuning needed.
Function Calling
The model emits structured JSON specifying a tool call instead of free text; the host executes it.