CourseAI Engineering: The Complete Course · Module 9: Agents and Tool Use · part 69 of 105
Part 69 · Module 9: Agents and Tool Use

Lesson 2: Agent loops, limits and a person who says yes

18 min read·13 Oct 2026
Module 9 · Lesson 2 · About 45 minutes · Needs: Lesson 1 (tools and the tool-calling loop), Module 7 Lesson 6 (the approval gate)

The situation

Aisha Rahman writes: "Hi, can I return my robot vacuum (order 5521) and the smart bulbs (order 6150)?" Answering takes several tool calls, and one of them, starting a return, changes BrightCart's records.

Lesson 1 gave the assistant two reading tools and a loop. Dev now adds start_return. Marta asks what a runaway loop costs. Sam asks what stops an unapproved action. Priya wants to approve returns herself. This lesson answers all three with Aisha's message.

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.