Module 1 of 6 · 25 minutes

What makes an AI agent

'Agent' is the most hyped word in AI. This module gives you precise definitions — and the judgement to know when an agent is the right tool.

Learning objectives

  • Define workflows and agents
  • Describe the augmented LLM building block
  • Decide when an agent is justified
  • Place systems on an autonomy spectrum
Running the code

Examples are Python and run in a free notebook such as Google Colab. They use Anthropic's Python SDK because its tool-use format is compact; OpenAI, Google and Microsoft SDKs follow the same pattern with slightly different field names. You'll need your own API key, and you should replace YOUR-MODEL-NAME with a current model from your provider's documentation.

1.1 From chatbots to agents

A chatbot answers. An agent pursues a goal: it decides what to do next, uses tools — search, code, files, APIs — observes the results, and keeps going until the job is done or it needs help.

Anthropic's widely cited guide Building effective agents (December 2024) draws a useful line between two kinds of "agentic system":

Workflows

LLMs and tools orchestrated through predefined code paths. You decide the steps; the LLM does the work inside each step. Predictable and easier to test.

Agents

LLMs that dynamically direct their own processes and tool usage, typically in a loop guided by feedback from the environment. Flexible, but less predictable and more expensive.

Workflowyour code decides the pathStep 1(LLM)Step 2(LLM)Step 3(LLM)Agentthe LLM decides the pathLLM decidesnext actionTool ATool BDone?observepredictable · easy to testcheaper · less flexible
Workflows follow a path you design; agents choose their own next step in a loop. Both use the same building blocks.

1.2 The building block: an augmented LLM

Every agentic system starts with an LLM augmented with three capabilities:

  • Tools — functions it can call to fetch information or take actions (Module 2).
  • Retrieval — access to knowledge, for example through RAG (see the RAG course).
  • Memory — information carried across steps or sessions (Module 4).
LLMToolssearch, code, APIsRetrievalyour documentsMemorystate across steps
The augmented LLM: the building block of every agentic system.

1.3 When to use an agent — and when not to

The most important design advice from practitioners is: start with the simplest thing that works. Often that's a single well-prompted LLM call with retrieval. Add workflows when a task splits naturally into fixed steps. Reach for an autonomous agent only when:

  • the steps can't be predicted in advance (open-ended problems);
  • the task benefits from trying, observing and adjusting;
  • success can be checked (tests pass, data reconciles, the user confirms);
  • the extra cost, latency and risk are worth it.

Coding agents are a strong fit: the steps are open-ended, but tests give clear feedback. A refund-approval process with fixed rules is a poor fit: a workflow is safer and cheaper.

1.4 The autonomy spectrum

LevelWhat the AI doesExample
1. AssistantSuggests; a human does everythingDrafts an email reply
2. WorkflowExecutes fixed steps you designedClassify ticket → retrieve policy → draft reply
3. Supervised agentPlans and acts; a human approves key actionsResearches and prepares a refund, waits for approval
4. Autonomous agentPlans and acts within boundaries, reports backFixes failing tests in a sandbox and opens a pull request

Move up the ladder only as far as the task needs and your safeguards allow.

Key takeaways

  • Workflows follow predefined code paths; agents direct their own steps and tool use.
  • Agents are built from an LLM augmented with tools, retrieval and memory.
  • Start simple; use agents for open-ended tasks with checkable success.
  • Move up the autonomy ladder only as far as needed and as safeguards allow.