Skip to content
Module
Module 4 of 7Lesson 1 of 2~18 min

Specify the loop and its stop conditions

The loop is where an agent decides on its own, and a poorly scoped loop runs too long, costs too much or stops without achieving anything. This lesson helps you write the specification of an agent's loop, from its goal to its output, so the team knows when it stops and what it returns.

Lesson objective

By the end of this lesson, you will be able to specify an agent's loop: checkable goal, allowed tools, stop conditions, budgets, failure handling and final output.

Topics covered

  • agent loop
  • stop conditions
  • agent budget
  • agent specification
  • AI agents

In the glossary

Full glossary

Where it fits

The agent loop

How does the agent move forward, when does it stop, and does it need several agents?

Lessons in this module

  1. Specify the loop and its stop conditions (this lesson)
  2. Judge when an orchestrator and subagents are warranted

What you will learn in this module

This lesson is part of the course Design reliable agents and tool calling

  • Specify an agent's loop (goal, context, stop conditions, budgets, error handling) and judge whether an orchestrator and subagents are warranted.