Build a single-tool agent with real guardrails
Everyone can call an LLM; few can make it act safely. You build a focused agent that uses one real tool, reasons about when to use it, and can’t run away.
What you'll build
A reason-and-act agent with one real tool, input validation, hard stop conditions, and tracing of every step.
See how we teach, before you sign up
You don't just get code dumped on you. Every starter file and every solution is explained line-by-line, in plain English. Here's one real file from this project:
openai>=1.30 pydantic>=2.6 python-dotenv>=1.0
Reading this file
openai>=1.30Pins a minimum version so the tool-calling API your code relies on is guaranteed to exist.pydantic>=2.6The validation library that turns the model's untrusted tool arguments into typed, checked Python objects.python-dotenv>=1.0Loads your API key from a local .env file so secrets never get hardcoded into source.
Minimal deps: a tool-calling SDK plus Pydantic for argument validation.
That's 1 of 8 explained code blocks in this single project.
The build, milestone by milestone
- 1
Build the loop
5 guided stepsThe agent loop IS the agent. Everything else, tools, memory, guardrails, hangs off a correct, terminating loop. Get this wrong and nothing above it can be trusted.
- 2
Wire one tool safely
5 guided stepsA tool the model can call with arbitrary arguments is an injection surface. Validation is what separates a demo from something you’d let touch real data or money.
- 3
Trace everything
5 guided stepsWhen an agent does something weird in production, the trace is your only way to know why. No trace means every bug is a re-run-and-pray investigation.
- 4
Health check & cost ceiling
5 guided stepsEven a weekend agent can quietly burn money if it loops or a tool slows down. A health line and a cost cap turn “it ran” into “it ran, here is what it cost, and it can’t run away.”
What's inside when you start
You'll walk away with
This is portfolio-grade. Build it free.
Sign up to unlock every milestone step-by-step, the code skeletons, full reference solutions, and checkable tasks, with your progress saved as you build.
Start building