The Open-Source AI Stack

Glossary

tool-call loop

The host-orchestrated cycle behind tool use: the model emits a tool call, the host (not the model) executes it, and the result is fed back for the next turn.

Agents also: Protocols aka tool loop, function-calling loop

The control loop that turns a single model into an agent. The model does not run anything itself. It emits a structured tool call; the host program parses that call, executes the actual function (an API request, a shell command, a database query), and appends the result to the conversation; the model then reads the result and either answers or emits the next call. The cycle repeats until the model stops calling tools.

Naming the loop separately from function callingagentsA pattern where a model emits a structured call (function name plus arguments), the runtime executes it, and the result returns as input on the model's next turn. Open full entry is useful because the hard parts live in the loop, not the call. The host decides how many iterations to allow, what to do when a tool errors, how to truncate a large result, and how to detect when the model is stuck. Providers signal a pending call with a stop reason (an explicit “the model wants to call a tool” state) so the host knows to execute and resume rather than show the partial output to the user.

This loop is the engine under ReActagentsAn agent loop where the model alternates between reasoning steps (thought) and acting steps (tool call), explicitly interleaving free-form deliberation with structured tool use. Open full entry -style agents, multi-agentagentsArchitectures where multiple LLM-driven agents collaborate or compete on a task, each with its own role, prompt, or specialization, coordinated by an orchestrator or message-passing protocol. Open full entry systems, and MCPprotocolsAn open protocol from Anthropic that standardizes how language models discover and call external tools, data sources, and prompts via a small JSON-RPC interface. Open full entry clients: MCP standardizes how the host discovers and calls tools, but the surrounding emit-execute-feedback cycle is the same. It is also where the agenticagentsAn informal descriptor for AI systems that pursue multi-step goals via tool use, planning, and self-correction, rather than single-turn question-answering. Open full entry safety surface opens up, since the host is executing model-chosen actions with real side effects.

Sources

Mentioned in

Back to glossary