[00:03] then you should watch this video till the end. Understanding how your agent decides what to do next is equally important in [music] choosing the right LLM or framework. Imagine asking your traditional AI chatbot to debug a Python [00:17] code. The chatbot is going to give you a solution, but it is going to leave you to implement it and test it. But the same thing if you ask to the AI agent it is going to modify the code, debug it, test it and retry [music] it if [00:30] something fails. And guys this is called as agent loop and it involves four stages. The first one is perceive where it understands the current situation. Next one is reason where it decides what to do next. The third one is act where [00:45] to do next. The third one is act where it executes the code and calls an API or a tool if it wants to do a particular task. And finally observe where it evaluates the results determine if something goes wrong. But guys every LLM [00:59] call increases token consumption latency and cost. And in the recent anthropic study it [music] states that multi- aent systems use 15 times more token as compared to the regular chat interactions. And that's why you should [01:13] define three parameters while building an AI agent. And those parameter are maximum retry limits, [music] maximum iterations and clear stopping conditions. OpenAI agents SDK provides max turns as a parameter to limit [01:27] [music] agents execution. But remember guys, building autonomous agent is important, but knowing how to control that autonomy is equally [music] important. Subscribe to simply learn for more tech insights.