AI agent architecture diagram: the core components, real examples and trade‑offs
An AI agent architecture diagram maps the model, orchestrator, tools, memory and guardrails. Here's how real systems are drawn, what they cost and where they fail.

An AI agent architecture diagram shows the parts of an AI agent and how information moves between them. Nearly every version has the same core: a language model running in a loop, the tools it can call, the memory or context it reads from, and the guardrails that decide what it's allowed to do. If you can sketch those four boxes and the arrows between them, you understand most agents on the market.
What's changed recently is where the boxes sit. A year or two ago, diagrams put everything in one place. Now the serious designs split the "thinking" part from the "doing" part, and I think that shift tells you more about where agents are heading than any new model release.
The boxes on every agent diagram
Start with a definition, because "agent" gets stretched a lot. Anthropic's widely cited guide, Building effective agents, draws a line between two kinds of system. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths." Agents are "systems where LLMs dynamically direct their own processes and tool usage." That distinction matters for your diagram: a workflow is a flowchart you draw in advance, while an agent is a loop whose path you can't fully draw ahead of time.
Most agent diagrams, whoever draws them, end up with these parts.
| Box | Its job | Typical failure |
|---|---|---|
| Model (the "brain") | Reads the goal and context, decides the next step | Picks the wrong tool or stops too early |
| Orchestrator (the loop runner) | Runs the loop: calls the model, executes its tool calls, feeds results back | Gets stuck, loops forever or loses state on a crash |
| Tools (the "hands") | APIs, search, code execution, file access, other agents | Returns errors or untrusted content |
| Memory and context | The session history, retrieved documents and notes kept between runs | Overflows the context window or drops something important |
| Guardrails | Permissions, approvals, credential storage, output checks | Too loose (prompt injection) or too tight (nothing gets done) |
Anthropic calls the basic unit an "augmented LLM": a model with retrieval, tools and memory attached. Everything else is a pattern for wiring several of those together.
The wiring has also been standardising. The Model Context Protocol (MCP) is an open standard for connecting AI apps to tools and data, and Claude, ChatGPT, VS Code and Cursor support it. The A2A protocol, which now has a v1.0 specification, covers the other edge of the diagram: agents talking to other agents. Its own tagline sums up the split: "MCP connects an agent to tools, APIs, and data. A2A connects it to other agents." Both now sit under the Agentic AI Foundation. So on a modern diagram, the arrows to tools and the arrows to other agents are often labelled with protocol names, which they rarely were before.
Three real architectures, drawn out
The single loop
The simplest real agent is one model in a loop with a handful of tools. It reads the goal, calls a tool, looks at the result and decides what to do next until it's finished. Coding assistants and support bots often start here.
On paper it's one box with a circular arrow. Honestly, for most teams it's where I'd begin too.
Orchestrator and subagents
Anthropic's multi-agent research system is a good published example of the next step up. A lead agent plans the research, then spins up subagents that search in parallel, each with its own context window, and report back condensed findings. In Anthropic's internal research eval, a setup with Claude Opus 4 leading and Claude Sonnet 4 subagents beat a single Opus 4 agent by 90.2%.
The cost line on that diagram is the part people skip. Anthropic found agents typically use about 4 times more tokens than chat interactions, and multi-agent systems about 15 times more. It also says most coding tasks have fewer parallel pieces than research, so they're a weaker fit for this pattern.
Brain, hands and session, decoupled
The most interesting recent diagram comes from Anthropic's write-up on Managed Agents, its hosted service for long-running agents. The first version put the orchestrator, the code sandbox and the session log in a single container. When a container failed, the session was lost, and debugging meant opening a shell in a box that also held user data.
The fix was to "decouple the brain from the hands." The orchestrator calls the sandbox like any other tool, so a dead container just becomes a tool error the model can retry. The session log lives outside both, so a crashed orchestrator can restart and resume from the last event. Credentials sit in a vault that the sandbox can't reach, which means a prompt injection in generated code can't just read the tokens. That's three separate boxes with narrow interfaces between them, and in my view it's the diagram most production teams will end up drawing.
A worked example: a refund agent on paper
Take a customer-support agent that handles refund requests. Here's a version I'd put on a whiteboard (my own example, with made-up numbers).
- The customer's message arrives at the orchestrator, which loads the session history and the refund policy into context.
- The model decides it needs the order, so it calls an order-lookup tool through an MCP server.
- The model checks the order against the policy and drafts a decision.
- A guardrail checks the amount: anything over $200 goes to a human for approval, anything under is allowed.
- The refund tool runs, the result is written to the session log, and the model writes the reply.
Now put rough numbers on it. Say an ordinary chat answer uses about 2,000 tokens. Using Anthropic's ratios, a single agent handling the same ticket might burn around 8,000, and a multi-agent version around 30,000. If you're handling 10,000 tickets a month, that's the gap between 80 million and 300 million tokens. Would a second agent make refunds 3.75 times better? For a task this linear, I doubt it.
That's the real use of a diagram. Drawing it forces you to count the boxes, and every extra box costs money, latency and another place to fail.
Trade-offs: what the diagram hides
A good diagram makes a messy system legible. You can see where credentials live, which arrows cross a trust boundary, and which component to blame when something breaks. It also helps people who don't write code (security reviewers, compliance teams, managers) ask sharper questions.
But diagrams flatter agents. They show tidy arrows; they don't show that the model may take a different path through those arrows every run. They also age fast. Anthropic's own Managed Agents post describes adding context resets to stop Claude Sonnet 4.5 wrapping up tasks too early, then finding the behaviour gone in Claude Opus 4.5, so "the resets had become dead weight." A box you add for today's model can be useless for the next one.
Frameworks bring their own trap. The building-effective-agents guide warns that they "often create extra layers of abstraction that can obscure the underlying prompts and responses, making them harder to debug," and suggests starting with LLM APIs directly. I think that's still sensible advice, even though the tooling has moved on a lot since Anthropic first published it.
Practical takeaways for drawing your own
If you're designing an agent, or judging one a vendor is selling you, a few habits help.
- Draw the workflow version first. If a fixed flowchart does the job, you probably don't need an agent at all.
- Mark every trust boundary, and put credentials outside anything that runs model-generated code.
- Keep the session log outside the orchestrator so a crash doesn't wipe the task.
- Label each arrow with its protocol (MCP, A2A or a plain API) and with who can call it.
- Write the token multiplier next to any multi-agent box before you build it.
- Add a human approval step wherever the agent spends money, sends messages or deletes data.
For the wider picture, our explainer on what agentic AI is covers the basics, and the step-by-step guide to building AI agents turns a diagram like this into working code. If you're choosing a framework, see our roundup of AI agent framework updates, and once something is live, agent observability tools show you what the loop actually did.
Next for agent architecture
Some of this is fairly clear already. The protocol layer is consolidating, with MCP and A2A under one foundation, so the arrows on diagrams will look more alike across vendors. Hosted agent services are also pushing the separation of brain, hands and session, partly because it's easier to run safely at scale.
The orchestrator itself is where I'm guessing. If models keep absorbing jobs the orchestrator used to do, like managing their own context or knowing when to stop, the orchestration box may shrink. Anthropic's Managed Agents design seems built for that possibility; it fixes the interfaces and treats whatever runs behind them as replaceable. My guess is that the best agent diagrams a couple of years from now will have fewer boxes than today's, not more, and I'd be a little suspicious of any vendor diagram that keeps getting busier.
FAQ
What are the main components of an AI agent architecture?
Most AI agent architecture diagrams include a language model that decides what to do, an orchestrator that runs the loop, tools the model can call, memory or context such as session history and retrieved documents, and guardrails like permissions and human approvals. Multi-agent designs add a lead agent that delegates to subagents.
What's the difference between an AI workflow and an AI agent?
In a workflow, the steps are fixed in code ahead of time and the model fills them in. In an agent, the model decides its own next step and which tools to use. Workflows are more predictable; agents handle open-ended tasks better.
Do I need a multi-agent architecture?
Probably not to start. Anthropic found multi-agent systems use about 15 times more tokens than chat, so they pay off mainly on broad, parallel tasks like research. For linear tasks such as support tickets or most coding jobs, a single agent loop with good tools is usually cheaper and easier to debug, and you can split it later if it struggles.
Where do MCP and A2A fit in an agent diagram?
MCP connects an agent to tools and data. A2A connects an agent to other agents. On a diagram, MCP labels the arrows to tools, and A2A labels the arrows between agents.
What tool should I use to draw an agent architecture diagram?
Any diagramming tool works, from a whiteboard to Figma or a text-based tool like Mermaid. The tool matters less than what you include: label every arrow with its protocol, mark trust boundaries and approval steps, and note where state and credentials live.



