Understand the agent loop
Read how an agent plans, acts, observes results, and may check in for human input.
Start with: Trustworthy agents in practice
RedLectern topic
Model-directed action loops · goals · autonomy · workflow boundaries · reliability.
For: Everyone · builders.
After this page you can: Distinguish an agent from a chatbot or predefined workflow.
Page reviewed
Part of: Artificial Intelligence
An AI agent is software in which a model directs some decisions and actions toward a task. The key distinction is control flow: a chatbot may return an answer, while an agent can select a tool, observe its result, adjust its next action, and continue until it finishes or asks for human input. A model can also appear inside a fixed workflow; that alone does not mean it controls the workflow. Anthropic says workflows offer predictability for well-defined tasks, while agents offer flexibility and model-driven decision-making when complexity is warranted.
Autonomy is a design choice, not an all-or-nothing label. A useful way to examine an example is to trace its goal, available actions, observations, stopping rule, and human checkpoints. Then ask which decisions are model-directed and which are set by surrounding software. Reliability depends on the whole arrangement: instructions, tools, environment, permissions, state, and checks shape what the agent can do. Start with bounded tasks and observable actions, and look for where a person can review, approve, or stop a run.
Read how an agent plans, acts, observes results, and may check in for human input.
Start with: Trustworthy agents in practice
An agent is distinguished by who directs the next step. In a model-directed loop, the model can use the task and results so far to choose what to do next. A predefined workflow sets its paths in advance, even when some of its steps use a model. These approaches can be combined: a workflow may contain an agent-directed loop, and the surrounding software may set limits or require review. The harness is part of that surrounding software. When you inspect a system, ask what the model may decide, what the software has already specified, and which tools and checks surround the model. The comparison is about control flow, not the product label.
See how one SDK-based agent is configured with a model, instructions, and optional runtime behavior.
AI agent
Software in which an AI model directs some of its own processes and tool use to accomplish a task.
Agentic workflow
A predefined process that contains model-driven steps or actions.
Agent harness
Software around a model that manages the agent loop, tool routing, approvals, recovery, and run state.
A system always runs steps A, B, and C in order, but a model chooses the wording of step B. Which part is predefined, and what would need to change for the model to direct the action loop?
The order A, B, C is predefined; the model only shapes step B. The model would need to choose or revise the next action based on the task and observed results.
A goal describes a result to pursue; it does not have to prescribe every move. In an action loop, the model receives the task and current input, produces an action or answer, and the surrounding runtime handles the result. If there is tool work, the loop can continue; if the run reaches a final answer, it can stop. A system may also hand control to a person or another specialist. To classify an example, mark each transition as chosen by the model, fixed in code, or handed to a person. Then check whether its permitted actions and stopping conditions fit the stated goal. More model choice means more autonomy in the loop, while leaving room for checkpoints and limits.
Read an account of agents adjusting a plan and asking for human input when needed.
A model searches a catalog, reads the results, and chooses whether to search again or report back. Name one observation that can affect its next action and one possible stopping condition.
A search result is an observation that can affect the next action. A stopping condition could be that the requested item is found, the search limit is reached, or more information is needed from a person.
An agent’s behavior depends on more than its model: the harness, tools, and environment shape the actions it can take and the information it can use. Reliability work therefore includes checking the boundaries around actions, as well as the answer at the end. Guardrails can validate inputs, outputs, or tool behavior; human review can pause a run so a sensitive action can be approved or rejected. These controls should match the action they are meant to govern. For example, a check attached to a particular tool can validate that tool call where it occurs. When studying a system, identify its permitted tools, the checks around their use, what triggers a pause, and how the run can stop or recover.
Read about oversight, permissions, and reliability risks around agent actions.
An agent can send an external message. Name one check that could run automatically and one point where a person could review the action.
An automatic check could validate the recipient and message contents against allowed rules. A person could approve or reject the send before the tool executes.
State across steps; persistent memory; coordination; multi-agent arrangements.
0 subtopicsTool use and automationTool calling; APIs; action validation; permissions; human review; bounded automation.
0 subtopicsComputer-use agentsAgents operating browsers and graphical interfaces; observations; actions; verification.
0 subtopicsNo recent updates are available.
David L. Poole and Alan K. Mackworth · 2023
A hosted, freely readable foundation for agent design, action selection, and goal-directed behavior.
Stuart J. Russell and Peter Norvig · 2020
Use this broad AI textbook for its explicit treatment of intelligent agents and the wider context around their decisions.
Richard S. Sutton and Andrew G. Barto · 2018
Learn how reward-driven agents act and learn through repeated interaction with uncertain environments. The authors make the complete second-edition text available online.