Types of AI Agents

"Agent" covers very different machines. Four questions tell you which one you are building.

BeginnerIntermediateExpert · 12 min read · Last updated:

In short

Classify an agent by four independent choices. How does it decide? Reactive or deliberative. Does the same input give the same output? Deterministic or probabilistic. Does it remember? Stateless or stateful. How long does a task live? Seconds or days. Each choice changes how you test, deploy and secure the system.

What you will learn: the classic agent types, the four design dimensions, what each costs and how to combine them.
Prerequisites: What Is Agentic AI? and The Agent Loop: Observe, Reason, Plan, Act, Reflect. Basic Python for the code.

Beginner The main families

Four questions, not one list

Decision styleReactive ↔ deliberative
BehaviorDeterministic ↔ probabilistic
StateStateless ↔ stateful
LifetimeShort-lived ↔ long-running
Each is a range. A real system often sits in the middle, or differs from one part to another.

The classic textbook types

Long before language models, artificial intelligence textbooks described agents by how much they know and consider. Russell and Norvig's well-known scheme is still a helpful vocabulary.

TypeDecides usingEveryday exampleLanguage-model equivalent
Simple reflexThe current input and fixed rulesA thermostatOne classification call that routes a message
Model-based reflexInput plus a record of what it cannot see nowA robot vacuum remembering wallsRules plus conversation state
Goal-basedWhich actions lead to a goalRoute plannerAn agent choosing tools until a task is done
Utility-basedWhich outcome is best across trade-offsChoosing cheapest acceptable deliveryAn agent ranking options by cost, time and risk
LearningFeedback that changes future behaviorA recommender that adaptsAn agent that stores lessons, or a model that is retrained

Reactive and deliberative agents

A reactive agent maps what it sees directly to an action. It is fast, cheap and predictable, and it cannot look ahead. A deliberative agent builds or consults a picture of the situation, considers options and then acts. It handles harder problems and costs more time, and its picture can be wrong or out of date.

AspectReactiveDeliberative
Looks aheadNoYes
Response timeShort and steadyLonger and variable
Needs a model of the worldNoYes, even a rough one
Typical failureStuck or short-sightedConfident plan based on wrong facts
Test withInput and expected actionScenarios, including changes mid-plan

See the difference

Both agents below cross the same warehouse floor from S to G. The reactive agent always steps toward the goal. The deliberative one searches the map before moving.

"""A reactive agent and a deliberative agent in the same warehouse."""
from collections import deque

FLOOR = [
    "S....#....",
    "####.#.##.",
    "...#.#.#..",
    ".#.#...#..",
    ".#.####.#.",
    ".#......#G",
]
MOVES = {"east": (0, 1), "south": (1, 0), "west": (0, -1), "north": (-1, 0)}

def find(mark):
    return next((r, row.index(mark)) for r, row in enumerate(FLOOR) if mark in row)

def neighbors(cell):
    for name, (dr, dc) in MOVES.items():
        r, c = cell[0] + dr, cell[1] + dc
        if 0 <= r < len(FLOOR) and 0 <= c < len(FLOOR[0]) and FLOOR[r][c] != "#":
            yield (r, c)

def reactive(start, goal, limit=60):
    """Rule: step to the open neighbor that looks closest to the goal."""
    here, path = start, [start]
    distance = lambda cell: abs(cell[0] - goal[0]) + abs(cell[1] - goal[1])
    while here != goal and len(path) <= limit:
        here = min(neighbors(here), key=distance)
        path.append(here)
    return here == goal, path

def deliberative(start, goal):
    """Search a model of the floor first, then follow the plan."""
    queue, came_from = deque([start]), {start: None}
    while queue:
        cell = queue.popleft()
        if cell == goal:
            path = []
            while cell is not None:
                path.append(cell)
                cell = came_from[cell]
            return True, path[::-1], len(came_from)
        for nxt in neighbors(cell):
            if nxt not in came_from:
                came_from[nxt] = cell
                queue.append(nxt)
    return False, [], len(came_from)

if __name__ == "__main__":
    start, goal = find("S"), find("G")
    ok, path = reactive(start, goal)
    print(f"reactive:     reached={ok} moves={len(path) - 1} "
          f"distinct cells={len(set(path))}")
    print(f"  last four positions: {path[-4:]}")
    ok, path, looked = deliberative(start, goal)
    print(f"deliberative: reached={ok} moves={len(path) - 1} "
          f"cells examined before moving={looked}")

Output:

reactive:     reached=False moves=60 distinct cells=10
  last four positions: [(3, 6), (3, 5), (3, 6), (3, 5)]
deliberative: reached=True moves=20 cells examined before moving=23

The reactive agent oscillates between two cells, because every step away from them looks worse. The deliberative agent examines the floor first and finds a path. The lesson is not that planning always wins. It needed a correct map, which real environments often lack. If a pallet blocked the route, it would have to notice and plan again.

One task, four designs

Take a delayed delivery. The goal is the same each time; the design changes what the system can cope with.

DesignBehaviorCopes withMisses
Simple reflexIf the message mentions "late", send the tracking linkThe most common questionA parcel already marked delivered but not received
Model-basedAlso remembers that a link was sent yesterdayAvoids repeating itselfStill cannot work out what to do next
Goal-basedAims to get the item to the customer; checks carrier, stock and optionsUnusual causesMay pick an expensive remedy
Utility-basedWeighs arrival date, cost and policy before proposingCompeting prioritiesOnly as good as the weights it is given

Notice that "goal-based" introduces a new risk along with new ability. A system told to get the item delivered may find ways that nobody intended unless limits are stated. Goals say what to achieve; rules say what must not happen on the way. Both are needed, and the rules belong in code where possible.

When reactive is the better engineering

Reactive designs are sometimes treated as primitive. In production they are often preferred, because they are quick, inexpensive, easy to explain and easy to test exhaustively. If most requests fall into a few well-understood groups, handle those reactively and measure how many remain. Only that remainder needs deliberation. This also keeps the expensive and variable part of the system small, which makes problems easier to find.

Watch for signs that a reactive design is being stretched: rules that contradict each other, a growing list of special cases, users rephrasing to get through, or a handover rate that keeps climbing. Those are evidence for adding reasoning to a specific area, not necessarily to the whole system.

Intermediate Variation, memory and combinations

Deterministic and probabilistic behavior

A deterministic component gives the same output for the same input and state. A probabilistic one may not. Language models produce a probability for each possible next token, and sampling settings control how the choice is made. Lower randomness settings reduce variation, but a hosted service may still return different text, because of implementation details or model updates. Do not build correctness on identical output.

Agents add other sources of variation: tool results change, searches return different documents, parallel steps finish in a different order and time passes. How LLMs Power Agents: Transformers, Tokens and Sampling explains sampling.

Put in deterministic codeLeave to the model
Identity and permissionsInterpreting a free-text request
Amounts, limits and arithmeticChoosing which source to read next
Preventing duplicate actionsDrafting an explanation
Stopping conditionsSuggesting a likely cause
Audit recordsSummarizing findings
Testing variable behavior

Assert properties instead of exact wording: the right tool was chosen, the amount matches the record, no forbidden action occurred. Repeat each model-backed case several times and report the pass rate.

Stateless and stateful agents

A stateless agent handles each request using only what arrives with it. A stateful one keeps information between steps or requests: conversation history, task progress, preferences or notes. Model APIs are often used in a stateless way, with the application resending the history. Some providers can hold conversation state for you. Either way, your design owns the question of what is kept.

AspectStatelessStateful
ScalingAny server can take any requestState must be shared or routed
FailureRetry the requestRestore state without repeating actions
PrivacyLess to protectRetention, access and deletion duties
DebuggingInput explains behaviorHistory must be inspected too
SuitsClassification, single lookupsMulti-step tasks, continuing relationships

Prefer to keep the processing stateless and put state in a store that you control. Then a crashed process loses nothing and memory is something you can inspect. See Agent Memory Types and Persistence.

Short-lived and long-running agents

A short-lived agent finishes while the user waits. A long-running agent works for minutes, hours or days, often pausing for an approval or an external event. The change in lifetime brings a change in engineering.

StartCreate task record
WorkDo one step
CheckpointSave progress
WaitApproval or event
ResumeReload and continue

This small program saves progress after each invoice. It is stopped part way and started again.

"""A long-running agent that survives a restart because state is saved."""
import json
import tempfile
from pathlib import Path

INVOICES = ["INV-1", "INV-2", "INV-3", "INV-4", "INV-5"]

def load(path):
    if path.exists():
        return json.loads(path.read_text())
    return {"done": [], "status": "running"}

def save(path, state):
    tmp = path.with_suffix(".tmp")
    tmp.write_text(json.dumps(state))
    tmp.replace(path)                      # atomic swap: never half a file

def work(path, crash_after=None):
    state = load(path)
    handled = 0
    for invoice in INVOICES:
        if invoice in state["done"]:
            continue                       # already finished in an earlier run
        if handled == crash_after:
            raise RuntimeError("process killed")
        print(f"  processing {invoice}")
        state["done"].append(invoice)
        save(path, state)
        handled += 1
    state["status"] = "complete"
    save(path, state)
    return state

if __name__ == "__main__":
    with tempfile.TemporaryDirectory() as folder:
        checkpoint = Path(folder) / "job-42.json"
        print("first run")
        try:
            work(checkpoint, crash_after=3)
        except RuntimeError as error:
            print("  !", error)
        print("second run")
        final = work(checkpoint)
        print(f"status={final['status']} handled={len(final['done'])}")

Output:

first run
  processing INV-1
  processing INV-2
  processing INV-3
  ! process killed
second run
  processing INV-4
  processing INV-5
status=complete handled=5

One gap remains. If the process died after processing an invoice but before saving, that invoice would be processed twice. For actions with effects, the receiving system should recognize a repeated request, usually by an idempotency key. Durable Execution, Checkpoints and Approvals covers the full approach.

Expert Hybrid designs and selection

Hybrid architectures

Mature systems combine styles in layers. A fast reactive layer handles urgent or routine cases. A deliberative layer handles the rest. A rule layer above both can veto actions.

Rules and limitsDeterministic; can block anything below
Deliberative layerPlans for unfamiliar or multi-step work
Reactive layerRoutes and answers familiar cases quickly
Illustrative example: a help desk

A password reset request is recognized and routed to a fixed procedure. An unusual login problem goes to an agent that investigates logs and proposes steps. Any change to account permissions requires a person, whatever either layer suggests.

How requests move between layers

The router is a component to be tested like any other. Decide what happens when it is unsure: sending uncertain cases to the more careful path is usually safer than guessing. Log the chosen route so that misrouting can be found, and let the reactive path hand over when its assumptions fail, for instance when a required field is missing.

What each style costs to run

A reactive handler may need one small model call, or none. A deliberative loop may call a model many times and resend a growing history on each call, so both time and token use climb with the number of steps. Stateful designs add storage and the work of protecting it. Long-running designs add queues, schedulers and people who watch for stuck tasks. None of these costs is a reason to avoid a design that the task requires, but each should be visible before the choice is made. Measure the share of requests that truly need the expensive path, and review it as usage changes. Agent Cost Model and Token Economics gives a way to estimate it.

Labels can mislead

A product described as "autonomous" or "reasoning" may be reactive in the places that matter to you. Ask to see what it does when the first attempt fails, what it stores and which actions it takes without asking.

Choosing a combination

TaskDecisionStateLifetime
Tag incoming mailReactiveStatelessSeconds
Chat support with order lookupsMostly reactive, some planningConversation stateMinutes
Fix a failing testDeliberative loopTask state and filesMinutes to hours
Month-end reconciliationWorkflow with planning inside stepsDurable checkpointsDays
Monitor systems and respondReactive triggers, deliberative diagnosisIncident historyContinuous service, short tasks

Start with the simplest column that meets the need. Each step toward deliberation, state and duration adds cost and failure modes. Add it when a test case fails without it.

Testing each dimension

A classification is useful because it tells you which tests are missing.

PropertyA test worth writing
Reactive routingMessages near the boundary between two routes, and ones that fit none
Deliberative planningA fact changes after the plan is made; the agent should notice
Probabilistic outputThe same case run many times; report how often each rule holds
StatefulnessTwo users in turn; nothing from the first appears for the second
Memory deletionDelete a fact, then ask for it in several ways
Long-running workStop the process after each step in turn, restart and compare effects

The final test is worth automating. Crash points are numerous and bugs hide at particular ones, often between performing an action and recording it. Agent Testing: Unit to End-to-End shows how to test an agent offline with a scripted model.

What each choice changes

If you chooseBudget time for
DeliberativePlan review, step limits, stale-fact handling
ProbabilisticRepeated evaluation, output validation
StatefulStorage, isolation between users, deletion, migration of old state
Long-runningCheckpoints, timeouts, cancellation, version changes during a task

The last item is easily forgotten. A task started under one version of a prompt or tool may resume under another. Store versions with the task, and decide whether old tasks finish on the old version or are migrated.

Classification checklist

  • I can say which decisions are rules and which are model choices.
  • Tests assert properties and report rates for variable behavior.
  • Every stored item has an owner, a retention period and a way to delete it.
  • Long tasks resume without repeating effects, and can be canceled.
  • Autonomy was chosen separately. See Autonomy Levels and Human Oversight.

Frequently asked questions

Is a language-model agent reactive or deliberative?

It can be either. A single call that picks a route behaves reactively. A loop that plans, checks results and revises is deliberative.

Does temperature zero make an agent deterministic?

It reduces variation but does not guarantee identical output on hosted services, and tool results can still differ.

Is multi-agent a separate type?

It is a way of composing agents. Each member can be classified by the same four questions. See Single-Agent vs Multi-Agent Systems.

Which type is most advanced?

The question is misleading. The right design is the simplest one that does the task reliably.

References and further reading

Next steps