What is max_iterations?
The most times an AI agent can repeat its act-and-observe cycle before it has to stop. It's a safety lock against endless loops.
Also called: max iterations, maximum iterations, iteration limit.
An analogy
A three-tries rule: if the delivery driver can't find the address by the third pass, they head back and report it instead of circling all night.
Where it shows up in the course
- Agents
- AI Safety
- MCP and the agent stack