What Is an Agent, Anyway?
You'll learn to
- -Define an agent as an LLM combined with tools and a loop, not a single call
- -Trace a minimal tool-calling exchange step by step
- -Preview the ReAct pattern and agent-specific challenges covered later in this course
A chatbot tells a user "I've scheduled that meeting with Sarah for next Tuesday at 2pm," and nothing actually happens. No calendar event exists anywhere. The model produced a plausible, confident sentence describing an action, because that is what a language model does, it generates plausible next tokens, and it has no built-in way to actually reach outside itself and act on the world. An agent is the architecture that closes exactly that gap.
The Minimal Definition: LLM + Tools + a Loop
Everything covered so far in this tier has been a single request in, single response out. An agent breaks that pattern in one specific way: instead of only being able to produce text, the model is given a set of tools it can choose to call (a calendar API, a search function, a database query), and instead of stopping after one response, the system runs a loop, feeding a tool's result back to the model so it can decide the next step, repeating until the task is genuinely complete.
Function Calling: How a Model Actually Invokes a Tool
The mechanism underneath this is function calling: alongside the prompt, you describe each available tool to the model as a schema (a name, a description of what it does, and the parameters it accepts). The model does not execute anything itself, it can never directly reach outside its own context. Instead, when it decides a tool is needed, it outputs a structured request naming the function and the arguments to call it with. Your application code is what actually executes that call and returns the real result back into the conversation.
tools = [
{
"name": "schedule_meeting",
"description": "Schedules a calendar meeting with a given person, date, and time.",
"parameters": {
"attendee": "string", "date": "string", "time": "string",
},
}
]
# 1. User: "Schedule a meeting with Sarah next Tuesday at 2pm."
# 2. The model, seeing the tool schema above, does NOT produce a text answer.
# It produces a structured tool call instead:
# { "name": "schedule_meeting", "arguments": {"attendee": "Sarah", "date": "2025-06-17", "time": "14:00"} }
# 3. Application code actually calls the real calendar API with those arguments.
# 4. The real result ("Meeting created, confirmation id #4471") is fed back
# to the model as a new message.
# 5. ONLY NOW does the model produce a final text answer to the user,
# grounded in what actually happened, not a plausible-sounding guess.A Fuller Trajectory: Two Tool Calls, Not One
Real tasks rarely resolve in a single tool call. Scheduling that meeting properly means checking availability first, and only booking once that check comes back clear, two full reason-act-observe cycles before the agent has enough grounded information to give a real answer. Step through the trace below and notice the shape repeating: think about what is needed, act by calling a tool, observe the real result, then think again with that new information in hand.
Tracing an Agent's Reason-Act-Observe Loop
Two full tool-call cycles before the agent has enough grounded information to answer.
User
"Schedule a meeting with Sarah next Tuesday at 2pm."
This Is a Preview, Not the Full Picture
This is still, relatively speaking, the simplest kind of agent: a fixed, predictable sequence of two tool calls. The full Agents & Tool Use tier ahead builds this out considerably further: the ReAct pattern named and formalized (explicitly interleaving reasoning about what to do next with the actual acting, rather than jumping straight to a tool call), agents that plan multi-step tasks and decompose them, agents that maintain memory across an extended task, multiple agents collaborating, and the hardening work (error handling, evaluation, orchestration) that turns a working demo into something safe to run in production.
The single most important mental model to leave this chapter with: a tool call is not the model "doing" something. It is the model requesting that your application do something, and reporting back on the real result. Every layer of safety, validation, and human oversight this course covers for agents exists at that boundary, between the model's request and your code actually executing it.
From Perceptrons to Reasoning Models
The papers, breakthroughs, and origin stories behind every idea in this course - from the 1958 Perceptron to modern LLM agents.
When machines first tried to think
Scale + GPUs = the deep learning revolution
The paper that changed everything
From 117M parameters to 100M users
Grounding AI in facts, not fiction
From text generators to autonomous workers
From notebook to 10 million users
Interview Signal is part of Pro
See a real weak answer next to a real strong one for this exact topic.
Quiz is part of Pro
Test what you just read with a short quiz, and bank the XP.
Build the Safety Net, Model Selector, and First Agent levels in the GenAI Lab: guardrails, model choice, and your very first agent.