Beginner-Friendly Topic
Take your time - it's perfectly normal to re-read this topic 2-3 times. Try the interactive code editor below to run code yourself. Use the Q&A section to check your understanding before moving on.You've got this!
Agent Execution Cycle
The agent execution cycle is the complete sequence from receiving a goal to delivering a result. Understanding the full cycle helps you design and debug complete agent systems.
The Full Execution Cycle
The complete agent execution cycle has these phases:
Phase 1: Goal reception
The agent receives a goal. The goal is stored in state. Tools are made available.
Phase 2: Initial planning
The controller reads the goal and decides the first action.
Phase 3: Action loop
The agent calls tools, receives observations, updates state, and decides the next action. This repeats until the goal is complete or a limit is reached.
Phase 4: Result delivery
The agent produces a final result and delivers it to the user or the next system.
Phase 5: Logging
The agent records a complete log of every step for auditing and debugging.