An AI agent is a software system that uses a large language model (LLM) as its reasoning engine to pursue a goal over multiple steps — it decides which…
Define the AI agent as an LLM reasoning engine wrapped in a loop that can act, not just answer.
An AI agent is a software system that uses a large language model as its reasoning engine to pursue a goal over multiple steps. It decides what to do, calls a tool to do it, looks at the result, and decides again.
The large language model is the brain; the agent is everything around it — the loop, the tools, and the memory that let the model take real actions instead of only producing text.
A plain chatbot maps one question to one answer. An AI agent maps a goal to a sequence of actions — it may search the web, run code, call an API, and check its own work before it finishes.
That shift from 'answer once' to 'act until done' is the whole idea of an agent.
Walk the observe–decide–act cycle that turns a single model call into goal-directed behaviour.
Every AI agent runs the same core loop. It OBSERVES the current state (the goal plus results so far), the model DECIDES the next action, the system ACTS by calling the chosen tool, and the result is fed back in — then it repeats.
The loop ends when the goal is met, a step budget runs out, or a guardrail stops it. Without a stop condition an agent can loop forever, so every production agent has one.
state = {"goal": goal, "history": []}
while not done(state):
action = llm.decide(state) # DECIDE: pick a tool + arguments
result = tools.run(action) # ACT: call the tool
state["history"].append(result) # OBSERVE: fold the result back in
if steps(state) > MAX_STEPS: # stop condition
break
answer = llm.finish(state)llm.decide is the model choosing the next tool call; tools.run executes it; the result is appended so the next decision sees it. MAX_STEPS is the safety valve that guarantees the loop halts.
The three parts that upgrade a model call into an agent: tools to act, memory to persist, autonomy to decide how far it goes alone.
Tools are the functions an agent can call — web search, code execution, a database query, sending an email. The model does not run these itself; it outputs a request ('search for X') and the surrounding system runs it and returns the result.
Tools are what let an agent affect the world instead of only describing it.
Short-term memory is the running history inside one task. Long-term memory stores facts across sessions — often in a database or vector store — so the agent can remember earlier conversations or learned preferences.
Autonomy is how many steps the agent takes before checking with a human. Low autonomy asks for approval before each action; high autonomy runs the whole task alone. More autonomy means more capability and more risk — production systems usually keep a human in the loop for irreversible actions.
Place the AI agent against the two things people confuse it with, and give a rule for telling them apart.
A chatbot answers one turn at a time with no actions. A fixed workflow runs pre-defined steps in a set order (step 1 → step 2 → step 3). An AI agent decides the steps itself at run time and can loop, branch, and use tools.
The test: if the sequence of steps is chosen by the model while it runs, it's an agent. If the steps are hard-coded by a developer, it's a workflow.
Give a concrete decision rule so the reader knows when an agent earns its extra complexity.
Reach for an agent when the steps can't be known in advance — research across many sources, debugging, or tasks where the next move depends on what the last one returned. If you can draw the flowchart ahead of time, a fixed workflow is cheaper and more reliable.
Agents cost more (many model calls), are harder to predict, and can loop or take wrong actions — so use the least autonomy that solves the problem.
Agents can loop forever (fix with a step budget), take irreversible actions (fix with human approval on risky tools), and drift off-goal (fix with clear stop conditions and evaluations). Design these guards in from the start.
An AI agent is an LLM used as a reasoning engine inside an observe–decide–act loop, equipped with tools to act, memory to persist, and a level of autonomy you choose. It differs from a chatbot (which only answers) and a workflow (whose steps are fixed) because the model decides the steps as it runs.
Take a task you do often — say, 'find the three most relevant papers on a topic and summarise them.' Sketch it as an agent: what is the goal, which tools does it need, and what is its stop condition? Then decide honestly whether a fixed workflow would do the job more cheaply.
In one sentence, what is an AI agent?
An AI agent is defined by acting over multiple steps toward a goal, not by answering once. The loop and tools are what make it an agent.
What ends an agent's loop?
Every production agent needs an explicit stop condition (goal reached, max steps, or a safety guard) or it can loop indefinitely.
What is the clearest test that distinguishes an AI agent from a fixed workflow?
Run-time, model-decided control flow is the defining feature of an agent. Pre-defined order is a workflow.
When is a fixed workflow the better choice over an agent?
If the path is known ahead of time, a workflow avoids the cost, unpredictability, and looping risk of an agent.