Foundations ยท Module 2
From LLMs to agents
A Large Language Model (LLM) is like an incredibly well-read assistant who has consumed most of human knowledge available on the internet.
Previously
Understanding AI
Let me start with what AI is not.
This module
From LLMs to agents
A Large Language Model (LLM) is like an incredibly well-read assistant who has consumed most of human knowledge available on the internet.
Next
Your computer's command line
I know the command line can look intimidating.
Progress
Mark this module complete when you can explain it without rereading every paragraph.
Why this matters
Key LLM characteristics Stateless .
What you will be able to do
- 1 Explain what an LLM is and what it is actually doing when it answers.
- 2 Describe the agent loop. Perceive, reason, act, observe, repeat.
- 3 Name the core building blocks of an agent and what can go wrong with each.
Before you begin
- No previous technical background required
- Read the section explanation before using tools
Common ways people get this wrong
- Tool misuse. If a tool can do too much, a small mistake becomes a big incident.
- Runaway loops. Without stop conditions, an agent can keep calling tools and never deliver a result.
Main idea at a glance
How LLMs Process Your Questions
The journey from input to output
Stage 1
Your Question
You ask the model a question or provide a prompt. This is the raw text input that begins the process.
I think it is worth understanding that the model sees your question as raw text, not as a request it understands yet.
1.2.1 Understanding Large Language Models
A Large Language Model (LLM) is like an incredibly well-read assistant who has consumed most of human knowledge available on the internet. When you ask it a question, it does not "look up" the answer. It predicts what text should come next based on patterns learned during training.
Key LLM characteristics
Stateless. Each conversation starts fresh unless you provide the history
Reactive. They respond to prompts but do not initiate action
Knowledge bounded. Limited to what was in their training data
Single turn focus. Optimised for question and answer exchanges
1.2.2 What makes an AI agent different
Here is where things get interesting. An AI agent is not just a chatbot that can answer questions. It is a system that can:
Perceive. Sense and understand its environment
Reason. Plan and make decisions
Act. Execute tasks in the real world
The AI Agent Loop
How agents continuously learn and adapt
Stage 1
Perceive
The agent observes its environment. This might be reading emails, checking a calendar, monitoring a sensor, or reviewing user input.
I think perception is where agents differ from chatbots. They actively gather information about the world around them.
The difference is action. The agent does not just tell you it cannot help. It goes and gets the information.
๐ฏ Interactive. Explore the differences
Use this interactive tool to explore the fundamental differences between LLMs, chatbots, and AI agents. Click on each concept to compare their capabilities, test your understanding with scenarios, and see concrete examples.
Interactive lab
Agent Concept Explorer
This module includes an interactive practice component. Open the deeper tool or workspace step when you want to test the idea rather than only read it.
AI agents are now a practical engineering concern
You can now find agent-style systems in coding tools, research assistants, customer support flows, and internal operations tooling. That does not mean most deployments are mature. It means builders need a better vocabulary for delegation, evidence, review, and safe escalation.
1.2.3 The anatomy of an AI agent
Every AI agent has four core components:
๐ฏ Interactive. ReAct pattern in action
The ReAct pattern is fundamental to how modern AI agents work. This simulator shows you step-by-step how an agent thinks through a problem.
Start with Play or Step. Then use the toggles to show maths, security flags, or tool details. The simulator scrolls to the step cards when a run starts, so the changes stay visible.
Interactive lab
Re Act Pattern Simulator
This module includes an interactive practice component. Open the deeper tool or workspace step when you want to test the idea rather than only read it.
Mental model
From chat to action
An agent is a loop that can plan, act with tools, observe results, then decide what to do next.
-
1
Goal
-
2
Reason and plan
-
3
Tool call
-
4
Observation
-
5
Result for user
Assumptions to keep in mind
- Tools have clear contracts. The agent can only act safely if tool inputs and outputs are explicit and validated.
- The loop is bounded. You need limits for steps, time, and cost so the agent can stop.
Failure modes to notice
- Tool misuse. If a tool can do too much, a small mistake becomes a big incident.
- Runaway loops. Without stop conditions, an agent can keep calling tools and never deliver a result.
Key terms
- ReAct
- Reasoning + Acting pattern where agents interleave thought processes with tool calls
Check yourself
Quick check. LLMs and agents
0 of 5 opened
What is the simplest honest description of what an LLM does
It predicts likely text based on patterns learned during training. It does not look up facts or understand like a human.
What extra capability turns a chatbot into an agent
Action. The agent can use tools to do things in the world, then observe results and adjust.
Name the three steps in the agent loop
Perceive, reason, act. Then observe and repeat.
Scenario. A user asks for tomorrow's meetings. Why does an LLM fail and an agent succeed
The LLM has no access to the calendar. The agent can call the calendar tool or API and return real results.
What is ReAct and why does it matter
Reasoning plus acting. It shows the agent thinking in steps and using tools between steps rather than guessing in one long response.
Artefact and reflection
Artefact
A simple diagram of an agent loop with one real tool call.
Reflection
Where in your work would explain what an llm is and what it is actually doing when it answers. change a decision, and what evidence would make you trust that change?
Optional practice
A gentle introduction. Give a toy agent a task and watch it think, act and observe step by step.
Also in this module
Build a multi-step agent
Design an agent with tools, memory and guardrails. Then run it through scenarios and see how your choices affect outcomes.