Every AI agent runs a loop. The program sends the model the goal and the conversation so far, the model either answers or asks for a tool call, the program runs the tool and appends the result, and the cycle repeats until the model gives a final answer or a limit is reached.
Most of an agent's behaviour, and most of its failures, come from how this loop is written. Without a step limit or a budget, a model that keeps calling the same tool can run for minutes and spend real money. These guides build the loop from scratch as a ReAct agent, show how to detect an agent that repeats itself without making progress, and set budgets that stop a run before it overspends.
The library lists all guides with filters for topic, level, category and reading time.