Go deeper
Build the kind of agent these lessons explain, with a closed list of actions and an approval step. Needs some Python.
Course
Build an AI agent for your business that picks actions from a closed list you define, waits for your approval on anything you haven't cleared to run alone, and refuses five kinds of action in code: moving money, DNS, deleting, revoking keys and changing itself.
- Level
- Builder: Python
- Format
- Video lessons, PDF, Files (zip)
- You need
- Some Python, or the patience to learn it with Claude beside you
Next lesson
AI Agent Safety: Approvals and Guardrails for Beginners
All lessons in AI Agents Explained Simply
Lesson script
The lesson's script, line by line. The published video's own lines are not on record here, so the video may differ in places.
Tools first. You describe each tool to the model: a name, a short description, and the inputs it takes. Think of it as a menu the model can order from.
When a request needs it, the model doesn't run anything. It replies with a tool call: which tool, and with what inputs.
Your code runs the tool, and sends the result back. Then the model carries on, with real data in hand. That's the whole trick.
Here's what a tool looks like. A name: find order.
A description. The model uses it to decide when to call the tool, so write it like you'd explain it to a new colleague.
And the inputs, as a small schema: here, one order number, and it's required. Required means the model has to give one every time it asks.
Quick quiz. When a model makes a tool call, who actually runs the tool? Comment your answer.
B, your code. The model only asks. Some tools run on the provider's side, but even then, the model doesn't run them itself.
Now memory. Short-term memory is the context window: everything the model can see right now, like a working memory. That's different from what it learned in training.
Every message, every tool result counts towards it. And as it fills up, the model gets worse at recalling things.
Long-term memory means saving what matters somewhere else, and looking it up again later. In n8n, the Simple Memory node keeps the chat history for you.
If these diagrams are helping, subscribe for the next one.
Third, planning. An agent starts from a goal, like: answer this customer.
It breaks that into steps: find the order, check what it says, draft a reply. A bigger setup can even hand steps to other models.
After each step it checks the real result, and adjusts. And a limit, like a maximum number of tries, makes sure it stops. Without one, a confused agent could keep going for a long time.
Pause the video and write down one goal from your own week. Something you do often.
Then split it into three steps an agent would take. Resume when you have them.
So where does MCP fit? It's an open standard for connecting AI apps to other systems. Think of a USB-C port for AI.
The app you use is the host. It opens one client connection for each server. Claude Code and Claude Desktop are both hosts.
And each server offers tools, along with resources and prompts. Write a tool once, and any MCP app can use it. That's why it keeps coming up.
Last quiz. In a very long chat, the model starts missing things. Why? Comment.
B. The context window is filling up, and recall gets worse as it does. A fresh chat, or saved notes, helps.
Recap. With tools, the model asks, and your code does the work.
Memory is the context window now, and saved notes for later.
Planning breaks a goal into steps, checks each one, and stops at a limit.
And MCP is the standard plug for tools. Three parts, one loop, and now you can draw it. Next time: keeping AI agents safe, with approvals and guardrails.