Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Evals for AI Agents in Python: Test Tool Calls and Judges
New

Evals for AI Agents in Python: Test Tool Calls and Judges

Build an eval harness from scratch: tool-call and path checks, an LLM judge you can trust, and a CI gate. Free, local.
Last updated 11/2026
English
English

What you'll learn

  • Build an eval harness for a tool-calling AI agent from scratch in plain Python
  • Check what an agent does (tools, arguments, order), not just the text it writes
  • Build an LLM judge, calibrate it against human labels and fix its biases
  • Block bad prompt or model changes with a regression gate in pytest and GitHub Actions
  • Grow test datasets from real failures and keep a held-back test set honest
  • Run everything free and offline with Ollama and a small open model

Course content

8 sections • 37 lectures • 1h 43m total length
  • What an AI agent is, and why it needs tests2:19
  • How this course works2:16
  • How to get help1:15

Requirements

  • Basic Python: functions, lists, dictionaries and loops
  • A computer with Windows, macOS or Linux and 8 GB of RAM (no GPU, API key or credit card needed)
  • Everything else is installed step by step in section 2

Description

This course contains the use of artificial intelligence. The narration is an AI voice (Google Chirp 3 HD), and AI tools helped draft scripts and slides. Every line of code was written and run for real on screen against a real local model, and every result you see is a real output, reviewed by the instructor.


AI agents don't just write text. They decide which tool to call, what to send it, and in what order. That makes them powerful, and it makes them break in ways normal tests never catch. An agent can give a confident, polite answer that is simply false, and a check on the final text will pass it.


In this hands-on course you'll build a complete evaluation ("eval") system for a real tool-calling customer-support agent, from an empty folder, in plain Python. No frameworks to learn, no API keys, nothing to pay for: everything runs free on your own laptop with Ollama and a small open model.


What makes this course different:

- Real screen-share coding in VS Code, not slides about code. Every result on screen comes from actually running it.

- A real agent with real bugs. You'll catch it telling a customer that a delivered order can't be refunded (the shop allows 30-day returns), and fix it.

- Short lectures (2-4 minutes) with a recap at the end of each: what we learned, keywords, and quick questions to test yourself.

- A capstone where your fix raises the score but breaks a refund that used to work, and a regression gate catches it before it ships.


You will:

- Write your first agent eval in about 15 lines, in the first section

- Turn it into a proper harness: dataset, runner, scorers and a report

- Grade the agent's whole path: tool choice, arguments, order, forbidden tools and step limits

- Build an LLM-as-judge, then test the judge: calibrate it against human labels, measure position and length bias, and fix it

- Grow a dataset from real support tickets, use synthetic cases safely, and keep a held-back test set

- Gate every change with pytest, a baseline and a GitHub Actions workflow


Course files include all the code (with the finished files for every lecture), the setup checker, the GitHub workflow and a cheat sheet PDF.

Who this course is for:

  • Software engineers building features with LLMs or AI agents
  • QA and test engineers moving into testing AI systems
  • Backend and ML engineers who need evidence, not vibes, before shipping an AI change