Build From Three Primitives

Every agentic system is built from three primitives — LLM call, tool call, and loop. Understand these primitives completely before reaching for higher-level abstractions.

What it is

Agentic systems — no matter how sophisticated they appear — reduce to three core operations: an LLM call (send context to the model, receive generated text), a tool call (execute a function and return the result), and a loop (repeat some combination of the above based on a condition). Everything else is composition: a workflow is a sequence of LLM calls and tool calls. An agent loop is an LLM call that selects a tool call inside a loop. A multi-agent system is multiple agent loops where some tool calls trigger other LLM calls. A retrieval-augmented pipeline is an LLM call whose inputs are populated by a tool call that runs a search. Understanding these three primitives deeply changes how you design systems. When a workflow is not working, you can reason about it at the primitive level: which LLM call produced the wrong output? Which tool call returned unexpected results? Where is the loop condition failing? You don't need to understand the abstraction layer — you can strip it away and look at the primitives. This matters for debugging, for performance analysis, and for designing the right level of abstraction. A system built on named, explicit primitives is transparent. A system that hides these primitives behind many abstraction layers is opaque when something goes wrong.

When to reach for it

When NOT to

Exemplars

Related