Week 1 · Session 1 · 2 hours

From Chatbot to Agent

Today you turn a plain LLM into an agent: something that reads a goal, decides which tool to use, uses it, and reacts to the result. You’ll leave saying: “My agent decided which tool to use — and used it.”

Begin →
Today you will

Three real wins

💬

Call a live LLM

Send a prompt to Claude/GPT from Python and get structured text back.

🔁

Build the loop

Wrap the model in a reason → act → observe loop that can call a tool.

🛠️

Give it a tool

Add a calculator and a search tool; watch the agent pick the right one.

Chatbot vs Agent: a chatbot is input to LLM to output; an agent loops the LLM with a tool
A chatbot answers once; an agent loops and calls tools.
Remember the contract: GOAL = what it’s trying to do · LOOP = reason → act → observe → repeat · TOOL = a function it can call · MEMORY = what it carries forward.
The Arc · check each off as you go in Colab (NB1)

Your step-by-step for today

The Engine

Walk the agent loop, one step at a time

A chatbot answers once. An agent runs a loop: it reasons about what to do, takes an action (calls a tool), observes what came back, and decides whether it’s done. This pattern is called ReAct (Reason + Act). Step through a real run: “What is the population of Tokyo times 2?”

The agent loop: GOAL enters, REASON to ACT to OBSERVE cycle, ANSWER exits
The ReAct loop: reason → act → observe, until the goal is met.
🔎 Notice the loop ran twice. First it searched, then it calculated — two different tools, chosen by the model, no human in between. That autonomy is the whole idea. Next week you give it memory so it can do this across a whole conversation.
Think like the agent

Which tool should it reach for?

An agent’s first job every loop is routing: given the goal, which tool (if any) helps? Read each request and pick what a well-built agent should call.

0 / 4
Loading…
Checkpoint

Did the idea land?

What actually makes an LLM into an “agent”?

Same model. The difference is the loop + tools around it — that’s Law #1: the magic is the loop, not the model.

Your agent gets asked “what’s 91423 × 20?” and answers instantly from the model with no tool call. Why is that a red flag?

Right. The tool exists because the model is unreliable at exact math. If it skipped the tool, your tool description probably wasn’t clear enough — that’s next week.
Lock it in

Law, badge, and this week’s mission

Law #1 · Week 1
The magic is the loop, not the model.

An agent is a plain LLM given the power to act, observe the result, and try again. You built that loop today.

🛠️

Badge earned: Tool User

You built a ReAct agent that read a question, picked the right tool, and used it in real Python.

🎯 Mission before Week 2
  • Add a third tool of your choice (a random-number generator, a unit converter — anything with a clear description).
  • Find one question where your agent picks the wrong tool. Fix the tool’s description so it chooses right. Bring the before/after.
Next: Memory & Tools → Week 2