Lesson 25 — Capstone: a study-buddy agent
Everything together
Your study buddy uses every idea from this course:
- a guardrail that refuses unsafe requests before the model sees them;
- long-term memory (
memory) that is sent to the model inside the system message; - a model that replies in JSON:
remember, afinalanswer, or a plan of tool calls; - three tools — calculator, clock and glossary — run from a registry;
- five eval cases that must all pass.
Two pieces are missing. When the model says {"remember": {"name": "Dana"}}, save it into memory (memory.update(...) adds a dict's keys to another dict). When it sends a plan, run every step and collect the results as text.
Why it matters: this is the real shape of an agent. Swap fake_llm for a model API call and it is a working app — the evals tell you whether the swap kept it working.
Fill both TODOs so all 5 evals pass: save reply["remember"] into memory and greet by name; run every plan step with TOOLS and append str(result).
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
A quick 3-question quiz on this lesson — instant feedback.
Ready for more? Optional paid resources that pick up where this lesson leaves off.
Some links on this page are affiliate links: we may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases.
Project-based AI Agents Foundations courses if you want a structured paid path after the free lessons. Wait for a sale — prices drop often.
Browse on Udemy →Search Amazon for AI Agents Foundations books — check the publication year so the examples match current versions.
Search Amazon →