Module 1 of 6 · Advanced · 8 min read
Agent fundamentals
The loop, the harness and the difference between a workflow and an agent.
- 1An agent is a model choosing actions in a loop until a goal is met.
- 2Workflows have code-defined control flow; agents let the model decide.
- 3Most reliability comes from the harness: tools, context and stop rules.
01The loop
The model receives a goal and context, decides on an action (usually a tool call), your code executes it, and the result goes back into the context. Repeat until the model decides it is done or a stop condition triggers.
This simple loop powers coding agents, research agents and computer-use agents alike.
02Workflows vs agents
In a workflow, your code defines the steps: classify, then extract, then draft. The model fills in each step. In an agent, the model chooses the steps dynamically.
Workflows are predictable, cheaper and easier to debug. Agents handle open-ended tasks where the steps cannot be known in advance. Use the simplest option that solves the problem.
03The harness matters
Two teams using the same model can get wildly different results. The difference is the harness around the model.
- Tool design and descriptions.
- What context is loaded, summarised or dropped.
- Verification steps such as tests or screenshots.
- Budgets, permissions and human checkpoints.
Finished reading?
Mark it complete to track your progress, then test yourself with the AI Agents quiz.