AI Agents & Tool Use
You have chatted with an AI. An agent is the next step: an AI that does not just answer, but acts — it decides to look something up, run a calculation, check a calendar, then uses what it learns to decide its next move. ChatGPT with tools, Claude with computer use, the coding assistants that edit your files — they are all the same idea. A model sits inside a loop, and the loop lets it reach out into the world. This course builds that loop from the bottom up, and every piece runs live in your browser.
This is genuinely hands-on. You will drive an agent's perceive–decide–act loop one step at a time; watch a model call a calculator instead of guessing the answer; chain reasoning and action across many steps with the ReAct pattern; fill a context window and watch it forget; give the agent a long-term memory; have it plan before it acts; build a router that picks the right tool for a request; and add the guardrails — step limits, loop detection, human confirmation — that keep a real agent from running off the rails. Each module also shows the matching LangChain / OpenAI / Claude tool-use idea — read-only, so you can recognize it later, with nothing to install now. Each ends with a short mastery check; pass it to mark the module complete.
The core loop
Module 1The Agent Loop
What makes an agent more than a chatbot? It runs in a loop: perceive, decide, act, observe — repeat. Activity: drive a number-guessing agent one step at a time and watch it close in by reacting to each clue. AI anchor: this loop is the skeleton of every agent ever built.
Module 2Calling Tools
A model that can only talk is stuck; a model that can act needs tools. Activity: ask an agent a math question and watch it choose to call a calculator instead of guessing, then read the result back. AI anchor: "tool use" / "function calling" is how ChatGPT browses, runs code, and checks the weather.
Reasoning across steps
Module 3The ReAct Pattern
Hard questions need more than one tool call. Activity: ask "how many more people live in Tokyo than Paris?" and watch the agent interleave Thought → Action → Observation — look up each city, then calculate — until it has the answer. AI anchor: ReAct is the pattern behind almost every modern agent.
Module 4Memory: Context & Recall
An agent only knows what is in front of it. Activity: fill a small context window and watch the oldest facts fall out, then give the agent a long-term store it can save to and recall from. AI anchor: the difference between the context window and a vector database / memory.
Module 5Planning Before Acting
For a multi-part goal, charging ahead one step at a time goes wrong. Activity: hand the agent a goal, watch it break it into a numbered plan, then execute the steps in order. AI anchor: plan-then-execute is how agents handle long, structured tasks.
Making it reliable
Module 6Routing to the Right Tool
With a toolbox of options, which one fits the request? Activity: send different questions through a router and watch it dispatch each to the calculator, the lookup, the calendar, or search. AI anchor: tool selection is the decision an agent makes on every single step.
Module 7Guardrails & Reliability
Agents fail in spectacular ways — infinite loops, wrong tools, runaway actions. Activity: watch an agent get stuck, then switch on a step limit, loop detection, and a human-in-the-loop confirm and watch it recover. AI anchor: the safety scaffolding every production agent needs.
Capstone
Module 8 · CapstoneBuild an Agent — and Know When Not To
Assemble every piece — loop, tools, ReAct, memory, planning, routing, guardrails — into one working agent and give it a real task. Then the most important judgment of all: when NOT to use an agent, and reach for a plain function or a single model call instead. A synthesis check ties every module together.