AI agent architectures: the five designs that matter
AI agent architectures decide who picks the next step: your code, a plan or the model. Workflows, ReAct, plan-and-execute and multi-agent, with Python.

An AI agent architecture is the control structure around a language model: which component decides the next step, what the model can see when it decides, and what stops the run. In practice there are five designs worth knowing, from least to most model control: a single augmented LLM call, a fixed workflow, plan-and-execute, a ReAct-style tool loop, and a multi-agent system where one model hands work to others.
What are the parts of an AI agent architecture?
Lilian Weng’s LLM Powered Autonomous Agents (June 23, 2023) gave the breakdown most people still use. The LLM is the “brain”, and three components sit around it:
- Planning: breaking a task into subgoals, plus reflection and refinement over past actions.
- Memory: short-term (what is in the context window) and long-term (an external store the agent can retrieve from).
- Tool use: calling external APIs for information the weights don’t hold.
The CoALA paper (Sumers, Yao, Narasimhan and Griffiths, September 2023) formalized the same idea with vocabulary from cognitive science: modular memory, a structured action space split into internal actions (retrieval, reasoning, learning) and external actions on the environment, and a decision procedure that picks among them. I find CoALA most useful as a checklist. When an agent misbehaves, I ask which of those three it got wrong: what it remembered, what it could do, or how it chose.
Anthropic’s Building effective agents (December 19, 2024) calls the base unit the augmented LLM: “an LLM enhanced with augmentations such as retrieval, tools, and memory.” Every architecture below is a different way of wiring augmented LLM calls together.
What are the main AI agent architectures?
Here they are, ordered by how much control the model has.
1. Single augmented call. One request, with retrieval results and maybe one tool. Most production “AI features” are this, and most of them should stay this. A RAG answer box is an augmented LLM call.
2. Workflow. Your code calls the model several times along a path you wrote: prompt chaining, routing, parallelization. Anthropic defines workflows as “systems where LLMs and tools are orchestrated through predefined code paths.” I compare them with agents in workflows vs agents.
3. Plan-and-execute. The model writes a plan once, then code (or cheaper model calls) executes the steps. The research root is Plan-and-Solve prompting (Wang et al., ACL 2023), which asked the model to first devise a plan that divides the task into subtasks, then carry them out. It’s cheap because the expensive model thinks once. It’s brittle when step three’s result should change step four, so real versions add a replan step on failure.
4. ReAct loop. The model chooses one action, sees the observation, and chooses again. ReAct (Yao et al., October 2022) interleaved reasoning traces with actions and beat imitation and reinforcement learning methods on ALFWorld and WebShop by 34 and 10 points of absolute success rate, using one or two in-context examples. This is what people now mean by “an agent”, and it’s the loop in what an AI agent is. The ReAct pattern post goes deeper.
5. Multi-agent. A lead agent splits the work and hands parts to other agents with their own context windows, then combines what they return. Anthropic’s research system (June 13, 2025) is the clearest public example: a lead agent plans and spawns subagents that search in parallel. I cover it in what a multi-agent system is.
Two patterns cut across these rather than replacing them. An evaluator-optimizer loop adds a critic that sends work back until it passes. And reflection, as in Reflexion (Shinn et al., 2023), has the agent write lessons from failed attempts into memory for the next try.
How do the architectures differ in code?
The cleanest way I know to see the difference is to run one task through three designs and count model calls. The task: check stock for three items in an order and say what ships. The “model” is a stub policy so it runs offline, but the control flow is the real thing.
# architectures.py: one task, three agent architectures, counted in model calls.
# Python 3 stdlib only. The "model" is a stub policy so this runs offline.
STOCK = {"SKU-1": 4, "SKU-2": 0, "SKU-3": 9} # the environment
ORDER = ["SKU-1", "SKU-2", "SKU-3"]
calls = {"n": 0}
def model(kind, state):
"""Stub LLM. Each call is one round trip you would pay for."""
calls["n"] += 1
if kind == "plan": # plan-and-execute: write all steps up front
return [("check_stock", s) for s in ORDER] + [("answer", None)]
if kind == "next": # ReAct: pick one step from what it has seen
seen = {s for s, _ in state}
todo = [s for s in ORDER if s not in seen]
return ("check_stock", todo[0]) if todo else ("answer", None)
if kind == "summarise":
missing = [s for s, q in state if q == 0]
return f"ship {len(state) - len(missing)} items, backorder {missing}"
def check_stock(sku):
return STOCK[sku]
def workflow(): # fixed code path: code decides every step
obs = [(s, check_stock(s)) for s in ORDER]
return model("summarise", obs)
def plan_and_execute(): # model plans once, code executes the plan
obs = []
for tool, arg in model("plan", None):
if tool == "answer":
return model("summarise", obs)
obs.append((arg, check_stock(arg)))
def react(max_steps=10): # model picks each step after each observation
obs = []
for _ in range(max_steps):
tool, arg = model("next", obs)
if tool == "answer":
return model("summarise", obs)
obs.append((arg, check_stock(arg)))
return "stopped: step cap"
for name, fn in [("workflow", workflow), ("plan-and-execute", plan_and_execute), ("react agent", react)]:
calls["n"] = 0
result = fn()
print(f"{name:<17} model calls={calls['n']:<2} -> {result}")
Output (Python 3.13.11):
workflow model calls=1 -> ship 2 items, backorder ['SKU-2']
plan-and-execute model calls=2 -> ship 2 items, backorder ['SKU-2']
react agent model calls=5 -> ship 2 items, backorder ['SKU-2']
Same answer, one call versus five. Each ReAct call also resends the growing transcript, so the token gap is wider than the call gap. That is the trade every architecture makes: the more the model decides, the more you pay per run and the more places it can go wrong, in exchange for handling tasks you couldn’t script. Here the task was scriptable, so the workflow wins outright. The ReAct loop only earns its five calls when the observation at step two should change what happens at step three in a way you can’t predict.
How do I choose an agent architecture?
I ask three questions, in order.
Can I write the steps down? If yes, it’s a workflow, and I stop. Anthropic’s advice in the same post is to find “the simplest solution possible, and only increasing complexity when needed.” Document extraction, classification and question answering over a known corpus are the usual enterprise asks, and all three are workflows with good retrieval.
Does the next step depend on what the last step found? If the path branches on tool results in ways I can’t enumerate, it’s a loop. Coding agents are the canonical case: you don’t know which file to open until you’ve read the stack trace.
Is the work wide, or deep? Multi-agent designs pay off on wide work, where many independent threads can run in parallel and each needs its own context. Anthropic says its research system uses about 15 times the tokens of a chat, and that coding is a weaker fit because “most coding tasks involve fewer truly parallelizable tasks than research.” Deep, sequential work belongs in one loop.
From the data-platform seat I held at Walmart, the line I’d circle is state. A workflow’s state lives in your code and your database, where you can inspect, replay and audit it. An agent’s state lives mostly in a transcript. Moving up the ladder means moving state from places you control into a context window you only partly control, so the architecture decision is also a decision about debuggability and audit.
Where do agent architectures break?
Compounding errors. Anthropic lists “higher costs, and the potential for compounding errors” as the price of autonomy. A loop that’s right 95% of the time per step is wrong a lot more often over twenty steps.
Stale plans. Plan-and-execute fails quietly when the world changes mid-plan. Add a check after each step and a replan path, or use a loop.
Context growth. Every observation in a ReAct loop stays in the transcript. Long runs need compaction, agent memory or subagents that return summaries instead of raw output.
Framework fog. The Anthropic post warns that frameworks “often create extra layers of abstraction that can obscure the underlying prompts.” I’d write the first version of any architecture against the raw API so I know exactly what the model sees on each call.
What I would do
Start at rung one and climb only when a failing test case forces you to. Concretely:
- Write the task as a workflow first. If you can’t, write down why; that reason is your spec for the agent.
- When you need a loop, give it a step cap, a token budget, structured tool results and a log of every call. The cap matters more than the prompt.
- Add plan-and-execute when runs are long and the steps are predictable, since one planning call on a strong model plus cheap execution beats a strong model on every step.
- Reach for multi-agent only for wide, parallel work such as research, and budget for the token multiple before you build it.
- Keep tool calling interfaces boring: absolute paths, typed arguments, short descriptions. Anthropic found that requiring absolute file paths removed a class of model errors in its SWE-bench agent.
FAQ
What are the types of AI agent architectures?
The practical set is single augmented LLM call, workflow (chaining, routing, parallelization), plan-and-execute, ReAct-style tool loop, and multi-agent (orchestrator with subagents). Reflection and evaluator-optimizer loops are add-ons that work with any of them.
What is the difference between ReAct and plan-and-execute?
ReAct decides one step at a time after seeing each result. Plan-and-execute writes the whole plan first and then runs it. ReAct adapts better; plan-and-execute uses fewer expensive model calls.
Is a multi-agent architecture better than a single agent?
Only for some tasks. Anthropic reports a large gain on breadth-first research, at about 15 times the tokens of a chat, and says coding tasks parallelize less well. For sequential work, one agent with good context management is usually simpler and cheaper.
What is the augmented LLM?
Anthropic’s term for the building block of agentic systems: a model with retrieval, tools and memory attached. Every agent architecture is a pattern of augmented LLM calls.
Sources
- Anthropic, Building effective agents, December 19, 2024
- Anthropic, How we built our multi-agent research system, June 13, 2025
- Lilian Weng, LLM Powered Autonomous Agents, June 23, 2023
- Sumers, Yao, Narasimhan and Griffiths, Cognitive Architectures for Language Agents (CoALA), arXiv, September 2023
- Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models, arXiv, October 2022 (ICLR 2023)
- Wang et al., Plan-and-Solve Prompting, ACL 2023
- Shinn et al., Reflexion: Language Agents with Verbal Reinforcement Learning, arXiv, March 2023