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
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
- Specify the loop and its stop conditions (this lesson)
- 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.
Related courses
- AI & ProductAdvancedRegular practice: you already use the tools or work on this topic.
Build an AI assistant for your product
3 hr
- AI & ProductAdvancedRegular practice: you already use the tools or work on this topic.
Design a RAG architecture that fits your product
3 hr 30 min
- AI & ProductAdvancedRegular practice: you already use the tools or work on this topic.
Evaluate an AI feature: test sets, metrics and LLM judges
3 hr