CourseAgentic AI Engineer: The Complete Course · Module 3: Tool Design · part 20 of 97
Part 20 · Module 3: Tool Design

Lab: The eight tools, guarded and tested

33 min read·13 Oct 2026
Module 3 · Lab · About 75 minutes · Needs: lessons 1, 2 and 3 (tool definitions and call_tool; make_safer_tools and make_retry_safe_tools; make_failure_safe_tools, FlakySystems and the guards)

What you are building

ONE CALL, FROM MODEL TO SYSTEMS model tool call call checks, names guards retry, breaker 8 tools final form FlakySystems down, slow, lost tests/test_tools.py one test per gap, no key all of it in returns_desk/tools.py
The finished piece: every call the model (amber) makes goes through BrightCart's code (blue), one door and a stack of guards, before the tools touch systems that fail on cue (red); tests (green) pin each gap.

The lessons built the tools in a notebook, one layer at a time. This lab moves their final form into returns_desk/tools.py, the file Module 3 adds to the package: the simulated systems, the eight tools, the definitions the model reads, one function every call goes through, and Lesson 3's guards, stacked. Tests then pin every gap the lessons found, and a real model works Mei's cancellation, R-1004, while payments and email misbehave. Everything at BrightCart is simulated.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.