Skip to content

Vol. I · First Principles · I.1

What an Agent Is

An agent is a loop in which a language model chooses the next structured action, deterministic code executes it, and the result is written back into the context. Personality, frameworks, and 'autonomy' are decorations on that loop.

6 min read

Doctrine

  • The model never executes anything. It emits structured intent. Code executes. The result is data.
  • If you cannot draw the loop on a whiteboard in four boxes, you do not have an agent — you have a chat wrapper.
  • Autonomy is a dial on how many loop iterations you allow, not a type of soul.

The only diagram that matters

Dex Horthy's 12-factor writeup and Anthropic's Building Effective Agents agree on the mechanics even when they disagree on branding. There is a context (a list of events). An LLM call maps that context to a next step — usually a tool call, sometimes a final answer. Deterministic code runs the step. The observation is appended. Repeat until done, failed, or handed to a human.

Everything that looks like magic — CrewAI crews, LangGraph graphs, OpenAI handoffs, Deep Agents subagents — is a way of deciding which prompt, which tools, and which slice of context go into the next iteration of that loop.

Why this definition is useful

It tells you where to put engineering. Prompts are the policy. Schemas are the API. The executor is the sandbox. The context is the product state. Tracing is a log of the loop. Evaluation is a test of whether the loop terminates correctly.

It also tells you when not to build an agent. If the path is known, write a workflow. If the path is unknown but bounded, write a loop with a budget. If the path is unknown and unbounded, you do not have a product yet.

Anti-patterns

  • Calling a single LLM call with tools an 'agentic platform'.
  • Hiding the loop inside a framework so nobody can pause, inspect, or resume it.
  • Giving the model a goal and a bag of tools with no termination condition.

Related