BeginnerCoder

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, a final answer, 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.

Want it another way?
Task

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.

Test your knowledge

A quick 3-question quiz on this lesson — instant feedback.

Enjoying this lesson? Share it.

Keep going with AI Agents Foundations

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.