09 · AGENTS, TOOLS & MCP
How does a model become an agent that can act?
A model generates responses. An agent can pursue a goal, use tools, observe results, and continue through multiple steps.
THE PROBLEM THIS MODULE SOLVES
“Check order 123 and send the customer an update.”
A model can understand the request and draft text. By itself it cannot:
- query the order system
- execute an external action
- track workflow state
- ask for approval
- continue a multi-step task
That extra system is the agent layer.
THE BIG PICTURE
Agent Architecture
OBSERVE → DECIDE → ACT → OBSERVE RESULT ↺
HOW THE AGENT LOOP WORKS
From a goal to a completed task
Agent chooses the next action.
Agent requests a tool.
Application performs the action.
Tool result comes back.
Update state, repeat, or ask approval.
ONE REAL EXAMPLE
Order-status update
UNDERSTAND EACH LAYER
Different roles, one agent system
THINK
Agent · Planning · Agent Loop
Decides what should happen next.
ACT
Tool Calling · Tools · Skills
Does something outside the model.
REMEMBER
State · Memory
Keeps useful task information.
CONNECT
MCP
Connects AI applications to tools and resources.
CONTROL
Human in the Loop
Adds review or approval.
COORDINATE
Multi-Agent Systems
Lets multiple agents work together.
WHY THE LOOP MATTERS
One response is not an agent loop
Input
↓
Output
Goal → Action → Result → New decision → Action ↺
Agents can adapt after seeing intermediate results.
TOOL CALLING
A request is not the real-world action
“I need order status.”
get_order_status({order_id: “123”})
executes
{status: “shipped”}
KEY DISTINCTIONS
What not to confuse
MODEL vs AGENT
A model can answer. An agent can carry out a task.
TOOL CALLING vs TOOL EXECUTION
Model: get_order_status(“123”). Application: calls the Order API.
STATE vs MEMORY vs CONTEXT
CONTEXT is information visible to the model right now.
MCP vs TOOL
MCP can connect an AI app to a file-search tool.
REMEMBER THIS