AI Agents

An AI agent is a system that uses a model to choose actions in an environment. Agents often combine reasoning, memory, tools, retrieval, and feedback so they can complete multi-step tasks.

What is the basic architecture of an AI agent?

The basic architecture of an AI agent describes how the main parts of the system are connected so the agent can receive a goal, understand the current situation, decide what to do, take an action, and continue until the task is complete. A simple architecture can be represented as: User or Environment → Input/Observation → Reasoning and Decision Making → Action/Tool → Result → State Update → Next Decision 1. Input or observation layer The agent first receives information from the user or its environment. This may include: a user request tool results API responses files database records application state previous execution results These observations give the agent the information it needs to understand the current situation. 2. Reasoning and decision making layer This layer determines what the agent should do next. In many modern AI agents, an LLM plays an important role here. The reasoning layer may: interpret the user's goal evaluate the current state decide whether more information is needed select a tool choose the next action determine whether the task is complete Some systems also include explicit planning or rule based logic alongside the model. 3. Tool and action layer The action layer allows the agent to interact with external systems. Examples include: calling APIs querying databases searching information sources running code reading or writing files sending messages updating applications The available tools define what the agent is actually capable of doing in its environment. 4. State and memory layer The agent needs somewhere to keep information that matters across steps. State may contain: the original goal intermediate results completed actions pending work tool outputs errors current decisions Some agents also use longer term memory to retain useful information across separate tasks or conversations. 5. Feedback layer After the agent performs an action, it receives a result. For example: Action: Query inventory system Result: Requested product is out of stock. That result becomes new information for the next decision. This feedback allows the agent to adapt instead of blindly continuing with the original assumption. 6. Control or orchestration layer The control layer manages the overall execution cycle. It decides when to: run another step call a tool update state retry or recover from an error ask for human input stop execution This layer implements the agent loop described in “What is an agent loop?” How the architecture works together Suppose an agent receives: Find a suitable meeting time for my team and schedule it. A simplified execution might look like this: 1. Input: Receive the meeting request. 2. Reasoning: Decide that calendar availability must be checked. 3. Action: Call the calendar tool. 4. Feedback: Receive available time slots. 5. State update: Store the available options. 6. Reasoning: Select an appropriate slot. 7. Action: Create the calendar event. 8. Feedback: Confirm that the event was created. 9. Control: Stop because the goal has been completed. Each architectural layer has a specific responsibility, but they work together as one system. Basic architecture vs. components The individual parts—such as tools, state, memory, and reasoning—are the components of the agent. The architecture describes how those components are organized and how information moves between them during execution. For a dedicated explanation of the individual building blocks, see “What are the main components of an AI agent?” In short The basic architecture of an AI agent connects inputs, reasoning, actions, state, feedback, and control into a repeated execution loop. The agent receives information, decides what to do, acts through available tools, stores relevant results, and uses feedback to determine the next step until the task reaches a stopping condition.

How does an AI agent receive a task?

An AI agent receives a task through an input channel that provides the goal, instructions, and any context needed to begin execution . That input may come directly from a user, from another software system, from a scheduled trigger, or from another agent. 1. User request The most common case is a user giving the agent a task through natural language. For example: Find three suitable hotels near the conference venue. The user's message becomes the initial task input. The agent may also receive additional information such as: dates budget location preferences constraints attached files These details help define what the agent is expected to accomplish. 2. Application or API request An agent can also receive tasks programmatically. For example, another application might send a structured request containing: Task: Investigate failed payment Customer ID: 4821 Order ID: A1045 Priority: High The agent does not need a conversational interface. A backend service can start the agent and pass the required task data directly. 3. Event or trigger Some agents begin work when an event occurs. Examples include: a support ticket is created a payment fails a new document is uploaded a monitoring alert is triggered an email arrives a scheduled time is reached The event acts as the signal that creates or starts the task. For example: New support ticket → Start support triage agent 4. Another agent or workflow In larger systems, one component may delegate work to another agent. For example: Coordinator agent → Research agent → Research task The receiving agent may be given: the task description relevant context expected output constraints identifiers needed to access shared state This allows a complex process to be divided among specialized agents. What information should a task contain? A useful task input usually contains enough information to answer questions such as: What should the agent accomplish? What context does it need? What constraints apply? What tools or resources are available? What result is expected? For example: Compare three cloud storage providers for our development team. Focus on price, access control, and API support. Return a short recommendation. This is clearer than: Research cloud storage. The first version gives the agent a more precise objective and expected output. Task input becomes part of agent state Once the task is received, the agent typically stores the relevant information in its execution state. For example: Goal: Compare cloud storage providers Criteria: Price, access control, API support Status: In progress Completed steps: None As the agent works, this state can be updated with results, completed steps, errors, and pending actions. Agent state is covered separately in “What is an agent state?” Receiving a task vs. interpreting it Receiving a task and understanding it are separate steps. Receiving the task means the task has entered the agent system. Interpreting the task means determining what the user or system actually wants and translating that request into an actionable goal. That next stage is covered in “How does an AI agent interpret a user goal?” In short An AI agent receives a task through an input such as a user request, API call, event, scheduled trigger, workflow, or another agent . The task typically provides a goal plus enough context and constraints for the agent to begin execution. That information is then passed into the agent's state and reasoning process so it can determine what to do next.

How does an AI agent interpret a user goal?

An AI agent interprets a user goal by turning the user's request into a clearer internal objective that it can reason about and act on . The agent tries to determine what outcome the user wants, what constraints apply, what information is missing, and what would count as successful completion. 1. Identify the intended outcome The agent first determines the main result the user wants. For example: Find me a good hotel near the conference venue for under ₹8,000 per night. The core goal is not simply “search for hotels.” It is closer to: Find a suitable hotel near a specific location that satisfies the budget constraint. This distinction matters because the agent's later decisions should be guided by the desired outcome rather than by the literal wording alone. 2. Extract constraints and preferences The agent identifies details that limit or shape the task. These may include: budget location dates deadlines preferred formats quality requirements allowed tools prohibited actions user preferences In the hotel example: Location: near the conference venue Budget: below ₹8,000 per night Objective: find a suitable hotel These constraints help the agent evaluate which actions and results are relevant. 3. Use available context The agent may also use context provided alongside the request. This could include: earlier conversation messages uploaded files application state user provided data results from previous steps task metadata For example, if the user already provided the conference address earlier, the agent may use that instead of asking for it again. 4. Resolve ambiguity Some requests are incomplete or ambiguous. For example: Book the best flight. The agent may need to determine what “best” means. Possible criteria could include: lowest price shortest travel time preferred airline fewest stops If the missing information materially affects the task, the agent may need to ask the user for clarification before proceeding. If the ambiguity is minor and safe defaults are defined, the system may instead apply those defaults. 5. Convert the request into an actionable representation After understanding the request, the agent may represent the goal internally in a structured form. For example: Goal: Find a hotel Location: Near conference venue Maximum price: ₹8,000/night Expected output: Recommended options Status: Not completed This representation helps the agent maintain consistency as it moves through multiple steps. The exact format depends on the agent architecture. It may be stored as structured state, task metadata, or natural language instructions. 6. Determine success criteria The agent also needs to understand what would count as completing the goal. For example, the task: Find three suitable hotels near the venue. may be considered complete when: three valid options are found each satisfies the important constraints enough information is available for comparison the results are returned to the user Clear success criteria help the agent know when to stop. 7. Pass the interpreted goal into execution Once the goal is understood, it becomes part of the agent's working state. The agent can then use it when deciding: what information to gather which tool to call what action to perform whether a result is useful whether another step is needed whether the task is complete The next article, “How does an AI agent decide what to do next?” , covers this decision stage. Example User request: Check why my deployment failed and tell me what likely caused it. The agent might interpret this as: Goal: Identify the likely cause of the failed deployment. Relevant information needed: deployment status error logs recent changes application or infrastructure errors Expected result: likely cause supporting evidence concise explanation This interpreted goal gives the agent a clearer basis for choosing its next actions. In short An AI agent interprets a user goal by identifying the desired outcome, extracting constraints and context, resolving important ambiguity, defining success criteria, and turning the request into an actionable objective . That interpreted objective then guides the agent's later reasoning, tool use, and stopping decisions.

How does an AI agent decide what to do next?

An AI agent decides what to do next by comparing its current goal and state with the actions available to it, then choosing the action that is most useful for making progress . The decision is usually based on four things: what the agent is trying to achieve what it currently knows what actions or tools are available what happened in previous steps 1. Start from the goal The agent first considers the objective it is working toward. For example: Identify why a software deployment failed. The goal gives the agent a basis for judging whether a possible next action is useful. If the agent has already interpreted the user's request into a clear objective, that interpreted goal becomes part of its working state. See “How does an AI agent interpret a user goal?” for the previous stage. 2. Examine the current state The agent then looks at what is already known. This may include: the original request completed steps tool results retrieved information errors pending tasks constraints previous decisions For example, if the agent has already checked the deployment status and found an error code, there may be no reason to repeat the same check. Instead, the error code becomes information for choosing the next step. 3. Consider the available actions The agent can only choose from actions it is allowed and able to perform. Possible actions might include: call an API query a database search a knowledge base read a file run code ask the user for missing information retry a failed operation produce the final answer The available tools and permissions therefore directly affect the agent's decision. 4. Evaluate which action is most useful The agent compares possible actions and chooses one that best supports the goal. For example, after receiving an error code, it might consider: checking application logs checking infrastructure logs reviewing the latest deployment asking the user for more information The best action depends on the current context. In many modern agents, an LLM helps make this decision. Some systems also combine the LLM with rules, planners, policies, or deterministic control logic. 5. Use feedback from earlier actions Results from previous actions influence future decisions. For example: Previous action: Query payment service Result: Payment service reports a timeout. The agent may now decide to inspect service health or retry under an approved policy rather than continuing with an unrelated action. This feedback driven behavior is what makes the execution adaptive. 6. Decide whether another action is needed Sometimes the correct next decision is not to call another tool. The agent may determine that: the goal has already been achieved enough information exists to answer user input is required the task cannot continue safely a stopping condition has been reached Choosing to stop is also part of the decision process. Example Suppose an agent is asked: Find out why my order has not shipped. A simplified decision sequence might be: 1. Goal: identify the shipping delay. 2. Current state: order exists but has not shipped. 3. Available actions: check payment, inventory, warehouse status, or carrier information. 4. Decision: check inventory because shipment cannot proceed without available stock. 5. Result: item is out of stock. 6. Next decision: determine whether a restock date is available. 7. Final decision: explain the cause and expected next step. Each decision is based on the goal plus the latest information. In short An AI agent decides what to do next by using its goal, current state, available actions, constraints, and feedback from previous steps to select the most appropriate next action . The chosen action is then executed, its result becomes new information, and the decision process repeats until the task is complete or another stopping condition is reached. The next article, “How does an AI agent execute an action?” , covers what happens after the agent has selected its next step.

How does an AI agent execute an action?

An AI agent executes an action by turning its chosen next step into a concrete operation through a tool, API, function, application, or other permitted interface . The decision step answers: What should I do next? The execution step answers: How do I actually perform that action? 1. Select the tool or operation After deciding on the next step, the agent identifies the capability that can perform it. For example, if the agent decides: Check the customer's order status. it may select an order management API or database query tool. If it decides: Send a meeting invitation. it may select a calendar or messaging tool. The agent can only execute actions that its system has exposed and permitted. 2. Prepare the required inputs Most actions require parameters. For example, an order lookup might need: order ID customer ID authentication context A calendar action might need: participants date time meeting title The agent prepares these inputs from the information available in its current state. If important information is missing, it may need to gather that information before the action can be executed. 3. Validate permissions and constraints Before execution, the system may check whether the action is allowed. Possible checks include: whether the tool is available whether the agent has permission to use it whether required parameters are present whether the action exceeds a spending or resource limit whether human approval is required whether the action violates a safety or business rule For example, an agent may be allowed to prepare a refund but require human approval before issuing it. 4. Invoke the tool Once the inputs and permissions are valid, the agent or orchestration layer calls the selected tool. For example: Selected action: Check order status Tool: Order API Input: Order ID A1045 The tool then performs the actual operation in the external system. The AI model itself usually does not directly modify the external system. It requests an action through a controlled tool interface. 5. Receive the execution result After the tool runs, it returns a result. For example: Result: Order A1045 is delayed because the item is out of stock. The result may contain: requested data confirmation of success an error a status code a partial result information needed for another step This result becomes new input for the agent. 6. Update the agent state The agent usually records relevant execution information in its state. For example: action attempted tool used result returned whether the action succeeded any error encountered new information discovered This prevents the agent from losing track of what has already happened. 7. Continue the agent loop After execution, the agent evaluates the result and decides what to do next. A simplified flow is: Decision → Tool call → Execution → Result → State update → Next decision For example: Decision: Check inventory Action: Query inventory system Result: Item unavailable Next decision: Check restock date The next article, “How does an AI agent observe the result of an action?” , focuses on how the returned result becomes a new observation for the agent. What if the action fails? An action may fail because of: invalid parameters unavailable services permission errors timeouts unexpected responses business rule violations The agent should not assume that every tool call succeeds. Instead, the failure result should be returned to the agent so it can decide whether to retry, choose another action, request help, or stop. Failure handling is covered separately in “How should an agent handle a failed execution step?” In short An AI agent executes an action by selecting an allowed tool, preparing the required inputs, passing permission and validation checks, invoking the tool, and receiving the result . That result is stored as part of the agent's current state and becomes new information for the next decision in the agent loop.

How does an AI agent observe the result of an action?

An AI agent observes the result of an action by receiving the output, status, or change produced by that action and treating it as new information for the next step . This observation closes the loop between acting and deciding again. A simple pattern is: Action → Result → Observation → State update → Next decision 1. The action produces a result After the agent executes an action, the external tool or environment returns something. For example: Action: Check order status The system might return: Result: Order A1045 has not shipped because the item is out of stock. That returned result becomes the agent's new observation. 2. Results can take different forms An observation is not always plain text. The agent may receive: structured API data database records success or failure status error messages files search results calculated values application state confirmation that an external action occurred For example, a calendar tool might return: event ID scheduled time invited participants creation status The agent's system converts the returned information into a form that can be used during the next reasoning step. 3. The agent determines what the result means Receiving a result is only the first part. The agent also needs to interpret whether the action: succeeded failed partially succeeded produced useful information revealed new constraints requires another action For example: Action: Find available meeting times Result: No common availability on Monday. The important observation is not only that a calendar query ran successfully. It is that Monday does not contain a valid time, so the agent needs another strategy. 4. Relevant information is added to state Useful information from the result is typically stored in the agent's current state. For example: Monday checked no common availability found Tuesday not yet checked This prevents the agent from forgetting what has already been discovered and helps later decisions use previous results. The dedicated article “What is an agent state?” covers state in more detail. 5. The observation becomes input to the next decision Once the result has been interpreted, it becomes part of the context used to decide what to do next. For example: Goal: Schedule a meeting Previous action: Check Monday Observation: No common time available Next decision: Check Tuesday This is how the environment influences the agent's behavior during execution. Success and failure are both observations An observation does not need to represent a successful action. For example: Action: Retrieve customer account Result: Permission denied That failure is still valuable information. The agent might then decide to: use another permitted source request authorization ask a human for help stop because it cannot proceed safely The agent should not ignore an error and behave as though the requested action succeeded. Observation vs. feedback The terms observation and feedback are closely related. An observation is the information the agent receives about what happened. Feedback emphasizes how that information affects the agent's next behavior. For example: Observation: API request failed because of a timeout. Feedback effect: The agent decides whether to retry, wait, use another tool, or stop. The next article, “How does feedback influence the next step of an agent?” , focuses specifically on that effect. Example Suppose an agent is trying to find an available product. 1. Action: Query Warehouse A. 2. Result: Product unavailable. 3. Observation: Warehouse A has no stock. 4. State update: Mark Warehouse A as checked. 5. Next decision: Query Warehouse B. Without observing the result, the agent would have no reliable basis for deciding what to do next. In short An AI agent observes the result of an action by receiving the action's output, interpreting what happened, storing relevant information in state, and using that observation as input for the next decision . This action and observation cycle is what allows an agent to adapt as a task progresses instead of following steps blindly.

How does feedback influence the next step of an agent?

Feedback influences an agent's next step by telling it what happened after its previous action and helping it decide whether to continue, change direction, retry, ask for help, or stop. Feedback turns agent execution into an adaptive loop rather than a fixed sequence of actions. A simple pattern is: Action → Feedback → Evaluate → Choose next step What counts as feedback? Feedback can come from many sources, including: tool results API responses success or failure messages error codes user responses changes in application state validation checks environment observations For example: Action: Check whether a meeting room is available. Feedback: The room is already booked. That feedback immediately changes what the agent should do next. How the agent uses feedback The agent compares the new feedback with its current goal and state. It may ask questions such as: Did the previous action succeed? Did I learn something new? Is the goal now complete? Do I need another action? Should I retry? Should I choose a different tool? Do I need user input? Should I stop? The answer determines the next step. Example: successful feedback Suppose the goal is: Schedule a meeting for Tuesday at 2:00 PM. The agent performs: Action: Create calendar event. It receives: Feedback: Event created successfully. The agent can now conclude that the main goal has been achieved and move toward completion rather than taking another unnecessary action. Example: feedback that changes the plan Suppose the agent tries: Action: Book the 6:00 PM flight. The result is: Feedback: Flight is sold out. The agent may now: 1. Update its state to record that the flight is unavailable. 2. Return to the remaining options. 3. Select another suitable flight. 4. Continue the task. The feedback causes the agent to change its next action. Example: failure feedback Consider: Action: Query customer account. Feedback: Permission denied. The agent should not assume that the account data was retrieved. Instead, it may decide to: request the required permission use another approved source ask a human for assistance stop if the task cannot continue safely The failure becomes useful information for decision making. Feedback can also confirm progress Feedback does not only identify problems. It can confirm that intermediate steps are complete. For example: Goal: Prepare and send a report. The agent may receive: data retrieval successful report generated successfully approval received email sent successfully Each result confirms progress and allows the agent to move to the next required step. Why feedback matters Without feedback, the agent would have to assume that its actions worked as expected. That could lead to problems such as: repeating completed actions continuing after a failure using outdated assumptions stopping before the goal is complete entering unnecessary loops Feedback allows the agent to remain connected to what is actually happening during execution. Feedback vs. observation An observation is the information returned after an action. Feedback describes how that information affects the agent's future behavior. For example: Observation: The requested product is out of stock. Feedback effect: Search another warehouse instead of attempting the same order again. For how action results enter the agent as observations, see “How does an AI agent observe the result of an action?” In short Feedback influences the next step of an AI agent by showing whether the previous action succeeded, failed, or changed the situation. The agent uses that information together with its goal and current state to decide whether to continue, adapt, retry, request help, or stop. This feedback driven decision process is a key reason AI agents can adapt during multi step tasks.

What is the observe-think-act loop?

The observe think act loop is a common way to describe how an AI agent repeatedly interacts with a task or environment. The cycle is: Observe → Think → Act → Observe again Each step uses the result of the previous step to determine what should happen next. 1. Observe The agent first receives information about the current situation. This may include: a user request tool results API responses application state files or retrieved information errors from previous actions The purpose of observation is to give the agent an updated view of what is happening now. 2. Think The agent evaluates the observation and decides what to do next. This stage may involve: comparing the current state with the goal identifying missing information choosing between possible actions selecting an appropriate tool checking constraints deciding whether the task is already complete “Think” refers to the agent's decision making process. It does not require the system to expose internal reasoning to the user. 3. Act The agent performs the selected action. Examples include: calling an API searching a knowledge base querying a database running code asking the user a question updating an external system returning a final answer The action changes the task state or produces new information. Then the loop repeats After the action, the agent observes the result. For example: Observe: Payment failed. Think: Determine the most useful diagnostic step. Act: Check the payment service status. Observe: Service reports a timeout. Think: Decide whether to retry or use another path. Act: Perform the selected next step. The agent continues cycling until a stopping condition is reached. Why this loop is useful The observe think act pattern helps an agent remain responsive to what actually happens during execution. Instead of assuming that every action succeeds, the agent: checks results updates its understanding changes direction when needed avoids blindly following an outdated plan This makes the process suitable for tasks where later decisions depend on earlier results. Observe think act vs. a fixed workflow A fixed workflow usually follows a predefined sequence. An observe think act agent can choose a different next action depending on what it observes. For example: Fixed workflow: Step A → Step B → Step C Observe think act: Observe → choose A or B → observe result → choose the next action The key difference is that the decision can be made during execution. Relation to the agent loop The observe think act loop is one way of expressing the broader agent loop . The broader concept may also be described using terms such as: Observe → Decide → Act → Feedback For the general concept, see “What is an agent loop?” In short The observe think act loop is a repeated cycle in which an AI agent observes the current situation, decides what to do, performs an action, and then observes the new result . This repeated feedback cycle allows the agent to adapt its behavior as the task progresses.

What is the plan-act-observe loop?

The plan act observe loop is an agent execution pattern in which the agent first creates a plan, performs an action from that plan, observes the result, and then updates or continues the plan. A simplified cycle is: Plan → Act → Observe → Replan or Continue This pattern is useful when a task requires multiple coordinated steps rather than only an immediate reaction. 1. Plan The agent starts by deciding how it intends to approach the goal. For example, if the task is: Investigate why a deployment failed. The initial plan might be: 1. Check deployment status. 2. Inspect error logs. 3. Review recent changes. 4. Identify the most likely cause. 5. Prepare a summary. The plan gives the agent a direction before it begins taking actions. 2. Act The agent then executes one of the planned steps. For example: Planned step: Inspect deployment logs. Action: Call the logging tool. The agent usually performs one action or a small group of actions before checking the result. 3. Observe After the action, the agent receives new information. For example: Observation: The deployment failed because a required environment variable was missing. This observation may confirm the current plan or make part of it unnecessary. 4. Replan or continue The agent compares the new observation with the remaining plan. It may decide to: continue with the next planned step skip unnecessary steps change the order add a new step replace part of the plan stop because the goal is already complete For example, if the missing environment variable clearly explains the deployment failure, the agent may not need to investigate several other possible causes. Why replanning matters A plan created before execution is based on incomplete information. As the agent acts, it learns more about the task. A rigid agent might continue following the original plan even when new evidence makes that plan outdated. A plan act observe agent can adapt. For example: Initial plan: Check service A → Check service B → Check database Observation after service A: Service A is definitely unavailable. Updated plan: Investigate service A first instead of continuing through every original step. Example Suppose an agent is asked: Find and book a suitable hotel near my meeting location. The agent may create this plan: 1. Find nearby hotels. 2. Filter by budget. 3. Check availability. 4. Compare suitable options. 5. Book the selected hotel. It then acts: Action: Search nearby hotels. The observation might be: Only two hotels are within the required distance. The agent updates its plan and continues with those two options instead of evaluating irrelevant hotels. Plan act observe vs. observe think act Both patterns describe iterative agent behavior, but they emphasize different things. Observe think act emphasizes repeatedly understanding the current situation and choosing the next action. Plan act observe emphasizes creating and maintaining a plan across multiple steps. In practice, an agent may combine both ideas. For the related pattern, see “What is the observe think act loop?” Does the entire plan need to be fixed in advance? No. A useful agent plan is often provisional. The agent can begin with a high level plan and refine it as new information appears. This is especially important when: tool results are unpredictable information is incomplete later steps depend on earlier results failures require alternative paths In short The plan act observe loop is a repeated process in which an AI agent creates a plan, performs an action, observes what happened, and then decides whether to continue or revise the plan . It helps agents handle multi step tasks while remaining flexible when new information changes the best path forward.

What is an agent execution cycle?

An agent execution cycle is the complete repeated process an AI agent follows while working on a task. A simplified cycle is: Receive task → Understand goal → Observe state → Decide next action → Execute action → Observe result → Update state → Repeat or stop The cycle continues until the agent reaches its goal, encounters a stopping condition, or can no longer continue safely or effectively. 1. Receive the task The cycle begins when the agent receives a task from a user, application, event, workflow, or another agent. For example: Find out why this customer order has not shipped. The task becomes the starting point for execution. 2. Understand the goal The agent determines what outcome is expected and what constraints apply. For example: Goal: Identify the cause of the shipping delay. Relevant constraints might include: use only approved systems do not modify the order return a concise explanation This gives the agent a clear basis for later decisions. 3. Observe the current state The agent checks what information is currently available. This may include: task details previous results tool outputs completed steps errors pending work At the beginning of execution, the state may contain only the original task. As the cycle continues, it becomes richer. 4. Decide the next action The agent evaluates the goal and current state to determine what should happen next. For example: Current state: Order exists but has not shipped. Decision: Check inventory availability. The selected action should help move the task toward completion. 5. Execute the action The agent performs the chosen action through an available tool or system. For example: Action: Query the inventory service. The action may succeed, fail, or return partial information. 6. Observe the result The result of the action becomes a new observation. For example: Result: Item is currently out of stock. This gives the agent new information that was not available before the action. 7. Update the state Relevant information from the result is added to the agent's working state. For example: inventory checked item unavailable shipping delay likely related to stock restock date not yet known State allows later decisions to use what has already happened. 8. Continue or stop The agent then decides whether another cycle is needed. It may continue if: the goal is not complete more information is required another action could make progress It may stop if: the goal has been achieved a stopping condition is reached human input is required the task cannot continue safely For example, after discovering that the item is out of stock, the agent might begin another cycle to check the expected restock date. Example execution cycle Consider an agent trying to diagnose a failed API request. Cycle 1 Observe: API request failed. Decide: Inspect the error response. Act: Retrieve detailed error information. Result: Authentication token expired. Update state: Record authentication failure. Cycle 2 Observe: Token is expired. Decide: Check whether token refresh is permitted. Act: Use the approved refresh mechanism. Result: New token issued. Update state: Authentication restored. Cycle 3 Observe: Authentication is available. Decide: Retry the original request. Act: Send the request again. Result: Request succeeds. Stop: Goal achieved. The repeated cycles allow the agent to adapt after every result. Execution cycle vs. agent step An agent step is one individual unit of work inside the execution process. An execution cycle describes the broader repeated pattern that connects observation, decision, action, result, and state updates. The next article, “What is an agent step?” , covers the smaller unit in more detail. In short An agent execution cycle is the repeated process an AI agent uses to move from a task toward completion by observing, deciding, acting, evaluating results, and updating its state . Each cycle produces new information that influences the next one, allowing the agent to adapt until it reaches a stopping condition.