GenLucid

FOUNDATIONS

What Is an AI Agent?

An AI agent is a language model that works toward a goal by choosing its own next step: it decides what to do, uses a tool, looks at the result, and decides again until the task is done. A chatbot answers once per message. A workflow follows steps that code fixed in advance. An agent is the one where the model picks the path.

One-pager titled "What is an AI agent?" with the subtitle "Who picks the next step?". Three columns. Chatbot, "You decide": You, Model, Answer in a line, labeled one reply per message. Workflow, "Code decides": Code, Model, Code in a line, labeled path fixed in advance. Agent, "The model decides": Goal leads to Model, Model leads to Tool, Tool leads to Result, and Result loops back to Model, labeled loops until done. The deciding step in each column is highlighted in amber. A legend under the boxes explains it: amber decides the next step (you, the code, or the model), steel takes part but does not decide.
One-pager: a chatbot, a workflow and an agent compared by who picks the next step. Amber marks whoever decides: you, the code, or the model.

The test: who picks the next step

Three things get called AI in an app, and one question separates them: what decides what happens next. In a chatbot, you do. You write a message, the model replies, and the conversation waits for you again.

In a workflow, code does. A developer wrote the sequence ahead of time: call the model to summarize, run a check, call the model again to draft a reply. The model is one stop on a path it did not choose.

In an agent, the model does. It receives a goal and the list of tools it may use, and it chooses the action. Anthropic's guide draws the same line: workflows run through predefined code paths, while agents dynamically direct their own process and tool use.

ChatbotYouModelAnsweryou decide: one reply per messageWorkflowCodeModelCodecode decides: path fixed in advanceAgentGoalModelToolthe model decides: results loop back until done

What the loop looks like

An agent run is a loop. The model picks one action. The action runs. The result comes back as new information. The model reads it and picks the next action, until it judges the goal met or a stopping condition fires, such as a limit on the number of steps.

That result coming back is the part that matters. A fixed script does the same thing whatever happens. An agent changes course because of what the last step returned: a failed command, an empty search, a file that is not where it expected.

Agents are not always fully autonomous. They can stop and ask a person for input at a checkpoint or when they hit a blocker, then continue.

GoalModelpicks one actionToolruns the actionResultcomes backnot done:pick againstops when the goal is met or a limit is hit

One run, step by step

Take the goal "the build is broken, fix it." The model asks to see the last commit. The diff comes back and shows a function was renamed. The model searches the codebase for the old name and gets two matches. It edits both, runs the build, and reads the result: it passes. It reports what changed and stops.

Nobody scripted those steps. If the search had returned five matches, or the build had failed again, the model would have taken a different path. The model made every decision. The code around it carried out each action and reported back.

model picksresult comes backShow last commita function was renamedSearch old nametwo matchesEdit both callersedits savedRun the buildbuild passesReports what changed, stops

What an agent is made of

An agent is three things working together: a model that decides, tools that act, and the code that connects them and runs the loop. That connecting code is called the harness. This page is about what an agent does and how it behaves from the outside. How the harness is built, and what it has to handle, is covered on the agent harness page.

The model is the same kind of model in a chatbot, a workflow, and an agent. What changes is what is built around it and who is allowed to choose the next step.

When an agent is the wrong choice

Agents suit open-ended problems where you cannot predict how many steps a task will take and cannot hardcode the path. Fixing a bug in an unfamiliar codebase is that kind of problem.

For a task you can write as fixed steps, a workflow is the simpler tool, and a plain function is simpler still. Anthropic's guidance is to find the simplest solution possible and add complexity only when needed. Agentic systems trade latency and cost for better performance on hard tasks, and that trade needs to be worth it for the task in front of you.

Autonomy also raises the cost of a mistake. A wrong decision early in a run can carry through every step after it, so agents need limits and guardrails, and testing before they touch anything that matters. The choice between AI and plain code is covered in when to use AI.

FAQ

What is the difference between an AI agent and a chatbot?
A chatbot produces one reply per message and waits for you. An agent takes a goal, then chooses and runs a series of actions on its own, using the result of each one to pick the next, until the task is done or a limit is reached.
What is the difference between an AI agent and an agent harness?
The agent is the whole working system: model, tools and the code that runs them. The harness is the code part, the loop and the safeguards around the model. The agent harness page covers how it is built.
Is an AI agent the same as an AI workflow?
No. In a workflow, a developer fixed the sequence of steps in advance and the model fills in one or more of them. In an agent, the model decides the sequence at run time, based on what each step returns.
Does an AI agent run without any human involvement?
Not necessarily. Agents can pause for a person at checkpoints or when blocked, and a well-built one asks for confirmation before destructive actions. How much autonomy to grant is a design decision, not a property of agents.
Is a model that calls one tool an agent?
Calling a tool once is tool use, not yet an agent. The agent pattern is the repeated cycle: act, read the result, decide the next action, and continue until the goal is met.