Part I — What actually is an agent?Lesson 01 of 36User & task2 min readdone

Chatbot vs workflow vs agent

What you should understand afterwards

Why calling an LLM isn't an agent; what "model controls the loop" means.

This lesson sets up the vocabulary the rest of the course uses. Lesson 2 builds the loop described in the second point below.

Three kinds of system, and what separates them

There are three kinds of system in this area, and separating them matters because they need different amounts of engineering and fail in different ways. The first is a single call to a language model: your program sends some text, the model returns some text, and your program carries on. The second is a workflow, in which several model calls are wired together along a path you write in advance, such as classify an incoming email, then route it by category, then draft a reply. The third is an agent, in which the model itself chooses what happens next, including how many steps there will be. Moving from the first to the second means writing more code; moving from the second to the third means giving up the ability to say in advance what your program will do.

Read

  1. Anthropic, "Building effective agents" § What are agents?
  2. OpenAI, "A practical guide to building agents" p. 4, What is an agent?
  3. Microsoft course · 01-intro-to-ai-agents/README.md

Who decides whether there is another step

A tool is a function you make available to the model, described to it by a name and a schema for its arguments. A tool call is the model asking, in its reply, for one of those functions to be run with particular arguments; your code runs it and sends the result back. The distinction between a workflow and an agent comes down to who decides whether another tool call happens. In a workflow that decision lives in your source code, so you can read the file and list every path the program is able to take. In an agent the decision arrives inside the model's reply, which means the number of steps is not known until the run has finished.

Read

  1. smolagents docs § An introduction to agentic systems
  2. Willison § Tools in a loop to achieve a goal
  3. OpenAI guide p. 14, Single-agent systems

Why the sources disagree about the word

Writers on this subject disagree about what counts as an agent, and the disagreement is not carelessness: they are applying different tests. Anthropic and OpenAI both ask who controls the flow of the program, so under their definition a fixed pipeline is a workflow no matter how capable the model inside it is. Hugging Face declines to draw a line at all and instead grades systems by how much agency they have. Chip Huyen uses the older definition from artificial intelligence textbooks, in which an agent is anything that perceives an environment and acts upon it, and that definition includes systems the other two would exclude. Knowing which test an author is applying makes their writing much easier to follow.

Read

  1. Chip Huyen, "Agents" § Agent Overview
  2. smolagents docs § An introduction to agentic systems, the spectrum claim
  3. Anthropic, "Building effective agents" § Building blocks, workflows, and agents

The costs of letting the model decide

Handing control to the model buys flexibility on tasks whose steps you could not write down in advance, and the price is paid in predictability, latency and money. Failures also become harder to reproduce, because two runs of the same task can take different paths. The reliability cost compounds rather than accumulating: if each step succeeds 95% of the time and a task needs ten steps, the whole run succeeds about 60% of the time, because the probabilities multiply. That calculation is the reason the later parts of this course spend so long on guardrails, evaluation and human checkpoints. When a workflow can do the job, it is usually the better choice.

Read

  1. Anthropic, "Building effective agents" § When (and when not) to use agents
  2. Chip Huyen, "Agents" § Agent Overview, the compounding-error arithmetic
  3. OpenAI guide p. 5, When should you build an agent?

My notes

  • There is no consensus with the definition of “agent”, although many would agree that you have workflows and agents and these are different things (i.e. Anthropic). Huggingface talks about a continuum in the level of agency of an agent.
  • A workflow is when you know the paths a program can take, and you can decide on the control-flow of a program, whereas most common definition of an agent involves the system deciding whether a certain criterion has been reached.
  • The definition of an agent is tightly bound to what it can do (tools and actions it can take in its environment)

Extra reading

  1. Building Effective "Agents" — discussionHacker News · 20 Dec 2024thread
  2. Stop Overengineering Your Agent HarnessHugo Bowne-Anderson · Vanishing Gradients · 21 Jul 2026newsletter
  3. LLM Powered Autonomous AgentsLilian Weng · Lil'Log · 23 Jun 2023post