Module 5: The Agent Loop
1 min read·13 Oct 2026
What you need first
- Module 2: the output contract, a final line
OUTCOME: <label>, and the locked promptprompts/system_v1.md, whichloop.pyloads (the lab writes it if missing). - Module 3: the eight tools,
make_failure_safe_toolsandcall, inreturns_desk/tools.py. - Module 4 is useful context but not required.
- Python functions, dictionaries and a
whileloop; SQLite at a reading level.