Learn It Fast

Architecture Patterns

Agentic Architecture Patterns

A visual reference covering 8 core architectural patterns in Agentic AI and how major frameworks implement them. Explore patterns, compare frameworks, and reference this when designing your own systems.

Part 1 — Architecture Patterns

Each pattern represents a different way to structure the loop between an LLM, tools, memory, and humans. Most real systems combine two or more patterns.

Filter

Pattern 01

Simple LLM

One-shot prompt → response, no tools or persistent memory

Low complexity
UserLLM(no tools/memory)Response

Characteristics

  • Stateless — each request is independent
  • No external tools or API calls
  • Fastest and cheapest to run
  • Context window is the only “memory”

Best for

Q&ASummarizationClassificationTranslationDrafting

Pattern 02

Tool-Calling Agent (ReAct)

LLM reasons, decides which tool to call, observes the result, repeats

Medium complexity
LLM(Reason)Tool CallObservationResponseloops until done

Characteristics

  • Thought → Action → Observation loop (ReAct pattern)
  • Tools can be APIs, databases, code runners, search engines
  • Runs until the LLM decides the task is complete
  • Requires tool definitions and output parsing

Best for

Web searchCode executionAPI integrationCalculatorFile I/O

Pattern 03

RAG — Retrieval-Augmented Generation

Retrieve relevant context from a knowledge store before generating

Medium complexity
QueryRetriever(vector store)Top-K DocsAugmentedPromptLLMResponse

Characteristics

  • Splits retrieval (vector search) from generation (LLM)
  • Dramatically reduces hallucination on factual queries
  • Knowledge is updateable without retraining the model
  • Retriever and LLM can use different models

Best for

Document Q&AEnterprise searchComplianceCustomer supportCode search

Pattern 04

Memory-Augmented Agent

Agent reads/writes to short-term and long-term memory stores

Medium complexity
LLM AgentShort-term(conversation)Long-term(vector store)Responseread/writeretrieve

Characteristics

  • Short-term memory: recent conversation turns (in-context)
  • Long-term memory: vector store / database (persistent across sessions)
  • Can personalize responses based on past interactions
  • Memory retrieval adds latency and cost

Best for

Personalized assistantsLong-running projectsCRM botsResearch agents

Pattern 05

Planner–Executor

Separate planning from execution — one LLM makes the plan, another executes it

High complexity
GoalPlanner(LLM)Plan(steps)Executor(LLM + tools)ResultPhase 1: PlanPhase 2: Execute

Characteristics

  • Planner decomposes goal into ordered sub-tasks
  • Executor runs each step with access to tools
  • Separation allows specialized models for each phase
  • Plan can be revised if a step fails (re-planning loop)

Best for

Complex task automationReport generationCode generation pipelinesResearch synthesis

Pattern 06

Multi-Agent Orchestration

A supervisor routes subtasks to specialist agents and aggregates results

High complexity
Supervisor(orchestrator)Specialist A(researcher)Specialist B(coder)Specialist C(writer)task dispatchresults return

Characteristics

  • Supervisor (orchestrator) agent manages task routing
  • Specialist agents run in parallel with domain expertise
  • Results are aggregated by the supervisor
  • Each agent can have its own tools and memory

Best for

Parallel researchSoftware development teamsContent pipelinesData analysis

Pattern 07

Event-Driven / Async Agent

Agent is triggered by external events — webhooks, schedules, messages

High complexity
External Event(webhook/cron)Queue(message bus)AgentAction(API/DB/tool)optional: trigger next event

Characteristics

  • Agents wake up in response to triggers, not user prompts
  • Message queues decouple event producers from consumers
  • Can run multiple agent instances concurrently
  • Suitable for long-running background automation

Best for

Workflow automationMonitoring & alertsETL pipelinesScheduled reportsWebhooks

Pattern 08

Human-in-the-Loop

Agent pauses at checkpoints for human review before continuing

Medium complexity
TaskAgentHumanReview?YesContinueDoneNo — revise & rerun

Characteristics

  • Human review gate before high-stakes actions
  • Agent can present options, human selects or corrects
  • State is persisted while waiting for human input
  • Reduces risk in agentic systems with real-world side effects

Best for

Content moderationFinancial decisionsMedical workflowsLegal reviewDeployment gates

Pattern Comparison

PatternComplexityMemoryToolsParallelBest For
Simple LLMLowQ&A, summarization, classification
Tool-Calling / ReActMediumAPI calls, calculations, web search
RAGMediumExternalDocument Q&A, knowledge retrieval
Memory-AugmentedMediumLong conversations, personalization
Planner–ExecutorHighOptionalMulti-step task decomposition
Multi-Agent OrchestrationHighPer-agentParallel research, complex pipelines
Event-DrivenHighOptionalAutomation triggers, async workflows
Human-in-the-LoopMediumOptionalHigh-stakes decisions, content review

Part 2 — Framework Landscape

The major open-source frameworks in 2025–26, each implementing one or more of the patterns above. Most teams pick one primary framework and extend it.

LangGraph

Directed graph topology with time-travel debugging and the lowest latency in benchmarks. 400+ companies in production.

Graph-based stateful agentsOpen Source

✓ Pros

  • Graph visualization + checkpointing for debugging
  • Production-grade: LinkedIn, Uber, Replit, Elastic

✗ Cons

  • Steeper learning curve than simpler frameworks
  • Tied to LangChain ecosystem

Notable users

LinkedInUberReplitElasticAppFolio

OpenAI Agents SDK (ex-Swarms)

The simplest explicit handoff model. Stateless by design; provider-agnostic (100+ LLMs). Prioritizes clarity over abstraction.

Multi-agent handoffsOpen Source

✓ Pros

  • Minimal abstraction — easy to reason about
  • Provider-agnostic, works with any OpenAI-compatible API

✗ Cons

  • No built-in state persistence between runs
  • Newer (Mar 2025); smaller production footprint

Notable users

OpenAI ecosystemExperimental / prototyping

Google ADK (Agent Development Kit)

Unique A2A (Agent-to-Agent) protocol lets ADK agents invoke LangGraph, CrewAI, or other framework agents. Native multimodal (images, audio, video).

Event-driven hierarchical treeOpen Source

✓ Pros

  • A2A protocol: cross-framework interoperability
  • Native multimodal support via Gemini

✗ Cons

  • Newest (Apr 2025) — smallest production footprint
  • Best on Google Cloud / Vertex AI

Notable users

Google CloudVertex AI workloads

CrewAI

Role abstractions (Manager, Researcher, Writer) make team-based workflows easy to design. Now the default runtime for LangChain agents.

Role-based multi-agentOpen Source + Commercial

✓ Pros

  • Intuitive role metaphor — easy for non-engineers to design
  • LLM-agnostic: assign different models by cost/latency per role

✗ Cons

  • Manager agent adds ~3× token cost for simple single-tool calls
  • Limited checkpointing vs LangGraph

Notable users

LangChain (default runtime)Business automation teams

AutoGen / Microsoft Agent Framework

Actor model enables group-chat and debate patterns. AutoGen merged with Semantic Kernel into Microsoft Agent Framework (Oct 2025) for production use.

Conversational multi-agent (actor model)Open Source

✓ Pros

  • Cross-language: Python + .NET support
  • Built-in OpenTelemetry observability

✗ Cons

  • AutoGen in maintenance mode since Oct 2025 — migrate to MS Agent Framework
  • Higher cost per query vs CrewAI / LangGraph

Notable users

Microsoft ecosystemEnterprise .NET teams

LlamaIndex Agents

Purpose-built for RAG + agentic retrieval. AgentWorkflow (2025) adds streaming and orchestration on top of best-in-class document indexing.

Agentic RAGOpen Source

✓ Pros

  • Best-in-class RAG pipeline (hybrid retrieval, self-correction)
  • 35% retrieval accuracy improvement in 2025 benchmarks

✗ Cons

  • Less suited for general orchestration tasks
  • Higher setup effort for non-document use cases

Notable users

AWS (Bedrock examples)Document-heavy enterprises

Haystack

Modular DAG architecture — every node is independently testable and replaceable. Strong enterprise production track record.

DAG pipeline agentsOpen Source + Commercial

✓ Pros

  • Explicit control: no black-box automation
  • Production-proven at Airbus, NVIDIA, European Commission

✗ Cons

  • More verbose setup vs higher-level frameworks
  • Steeper learning curve for complex agentic patterns

Notable users

AirbusNVIDIAThe EconomistEuropean CommissionLufthansa

Semantic Kernel

Best for .NET/Microsoft teams building plugin-based agent pipelines. Merging into Microsoft Agent Framework (Oct 2025) as the plugin layer.

Plugin-based orchestrationOpen Source

✓ Pros

  • Best .NET / C# support of any framework
  • Rich plugin ecosystem for Microsoft 365, Azure services

✗ Cons

  • Transitioning into MS Agent Framework — use that for new projects
  • Python support lags behind .NET

Notable users

Microsoft 365 integrations.NET enterprise teams

LangGraph vs OpenAI Agents SDK vs Google ADK

The three most-discussed graph/multi-agent frameworks in 2025–26

DimensionLangGraphOpenAI Agents SDKGoogle ADK
TopologyDirected graphs with conditional edgesExplicit agent-to-agent handoffsHierarchical agent tree + A2A protocol
StateCheckpointed (reducer-driven, time-travel debug)Stateless — context variables onlySession-based, persistent
MultimodalText-basedText-based✓ Native (images, audio, video)
InteropLangChain ecosystem nativeProvider-agnostic (100+ LLMs)A2A protocol — invokes other frameworks
DeploymentLangGraph Platform (hosted)Client-side (minimal infra)Vertex AI + Google Cloud
Released2023 (GA)Mar 2025Apr 2025
UsersLinkedIn, Uber, Replit, ElasticProduction upgrade of SwarmsGoogle Cloud ecosystem

Framework × Pattern Matrix

Primary  Supported   Not typical

FrameworkSimple LLMTool-CallingRAGMemoryPlanner–ExecMulti-AgentEvent-DrivenHuman Loop
LangGraph
OpenAI Agents SDK
Google ADK
CrewAI
AutoGen / MS Agent
LlamaIndex Agents
Haystack
Semantic Kernel
📊

2026 Performance Benchmarks

Cost per query

CrewAI — $0.12–0.15

LangChain — $0.18

AutoGen — $0.35

Latency ranking

🥇 LangGraph (lowest)

🥈 OpenAI Agents SDK

🥉 CrewAI

Production readiness

✓ LangGraph — GA

✓ MS Agent Framework — 1.0 (Apr 2026)

✓ Haystack Enterprise

✓ CrewAI — v1.0 (late 2025)

Benchmarks sourced from public comparisons as of April 2026. Costs vary by model and task complexity.