Architecture Reference Models for Agentic AI
Knowledge
There is no single unified architecture model for Agentic AI — but several reference models are frequently cited in the community. At their core, they all describe the same building blocks, just layered differently.
The Common Building Blocks
Regardless of the model, the same layers always appear:
- Interface — How the user (or trigger) interacts with the system: CLI, chat UI, webhook, cron
- Orchestration / Framework — The control logic: Which agent is called when? (LangChain, CrewAI, Claude Code)
- LLM / Model — The language model that thinks: Claude, GPT, Gemini, Ollama
- Context / Memory — agents.md, vector databases, session storage
- Tools / MCP — The instruments: shell, filesystem, Git, APIs, databases
- Output — What is produced: code, PR, chat response, docs, tickets
Reference Model 1: 6-Layer Model
A detailed model that explicitly separates each layer:
| Layer | Function | Example |
|---|---|---|
| Application | User interface, triggers | IDE, chat UI, webhook |
| Orchestration | Workflow control, agent coordination | LangGraph, CrewAI |
| Agent | Reasoning, planning, decisions | ReAct loop, Plan-and-Execute |
| Context | Context management, memory | agents.md, vector DB, RAG |
| Data | Data access, persistence | PostgreSQL, Pinecone, S3 |
| Model | LLM inference | Claude Opus, GPT-5, Ollama |
Strength: Makes the context and data layers explicit — important for RAG-based systems and enterprise setups with session management.
Reference Model 2: LAMP Stack for AI (4 Layers)
Modeled after the classic LAMP stack (Linux, Apache, MySQL, PHP) — a more compact variant:
| Layer | LAMP Analogy | Function |
|---|---|---|
| LLM | Linux (foundation) | The foundation: language model |
| Agent/App Logic | Apache (processing) | Orchestration, routing, business logic |
| MCP Gateway | MySQL (data) | Tool access via MCP protocol |
| Persistence | PHP (interface) | Data storage, memory, state |
Strength: Compact and easy to understand. Frontend is part of the app logic. No separate output layer.
Reference Model 3: Pragmatic Flow
The simplest model — a linear flow:
Chat Frontend → Agent → LLM Provider (interchangeable) → MCP Tools → Output
Strength: Shows the essentials: provider and tools are interchangeable. The agent is the central coordination instance.
Understanding
When Each Model Fits
| Use Case | Recommended Model | Why |
|---|---|---|
| Simple coding agent | Pragmatic Flow | Few components, no complex context management |
| RAG-based knowledge agent | 6-Layer | Context and data layers need explicit planning |
| Enterprise CI/CD agent | LAMP Stack | Clear separation, MCP gateway as central tool layer |
| Multi-agent orchestration | 6-Layer | Orchestration layer must be explicit |
Two Operating Modes
Each of these models can operate in two modes:
With User Input: A human initiates the process (CLI, chat, IDE). The agent works interactively, asks when uncertain, presents results.
Fully Automated: A trigger (cron, webhook, event stream) starts the process. The agent works autonomously — code review on every MR, docs on every deploy, monitoring around the clock.
iNo 'Right' Model
These reference models are thinking tools, not standards. In practice, they blend together. What matters is understanding the building blocks — the layering is secondary.
Apply
When designing an agentic AI architecture, start with these questions:
- Who triggers it? Human or trigger? → determines the interface
- How many agents? One or several? → determines the orchestration
- What context? Just prompt or also RAG/memory? → determines the context layer
- Which tools? Just filesystem or also APIs/DBs? → determines the MCP layer
- Which model? Do I need Opus or is Haiku enough? → determines the cost
Reflect
Architecture reference models give you a shared language for planning agentic AI systems. The building blocks are always the same — interface, orchestration, LLM, context, tools, output. How you layer them depends on your use case.