LLM Agent Architecture Patterns

title: LLM Agent Architecture Patterns created: 2026-06-01 updated: 2026-06-01

title: LLM Agent Architecture Patterns created: 2026-06-01 updated: 2026-06-01 type: concept tags: [agent, pattern, architecture] sources: [raw/articles/anthropic-building-effective-agents-2024.md, raw/articles/lilianweng-llm-agents-2023.md]

LLM Agent Architecture Patterns

Canonical patterns for building LLM-powered agents, synthesized from Anthropic’s “Building Effective Agents” (2024) and Lilian Weng’s “LLM Powered Autonomous Agents” (2023).

Core Distinction: Workflows vs Agents

Workflows: LLMs and tools orchestrated through predefined code paths. Predictable, consistent, good for well-defined tasks.

Agents: LLMs dynamically direct their own processes and tool usage. Flexible, good for open-ended problems where you can’t predict the path.

Anthropic’s advice: start with the simplest solution. Don’t use agents unless the problem demands it.

The Augmented LLM (Foundation Block)

Every agent builds on an LLM augmented with:

  • Retrieval — access external knowledge
  • Tools — call APIs, execute code, interact with environment
  • Memory — retain information across calls

Model Context Protocol (MCP) is one standardized way to expose tools.

Workflow Patterns

1. Prompt Chaining

Decompose task into sequence of steps. Each LLM call processes previous output. Add programmatic “gate” checks. Trade latency for accuracy. Best for fixed subtasks. 1

2. Routing

Classify input → direct to specialized handler. Separation of concerns. Example: route easy questions to small models, hard questions to large models. 2

3. Parallelization

Two variations:

  • Sectioning: independent subtasks run simultaneously, results aggregated
  • Voting: same task run multiple times, diverse outputs for confidence 3

4. Orchestrator-Workers

Central LLM dynamically breaks down tasks, delegates to worker LLMs, synthesizes results. Subtasks NOT pre-defined — determined at runtime. Example: coding tools that modify multiple files. 4

5. Evaluator-Optimizer

Generator LLM produces output, evaluator LLM provides feedback, loop until quality threshold. Best when evaluation criteria are clear and refinement is measurable. 5

Agent Design Principles (Anthropic)

  1. Maintain simplicity — resist complexity unless it demonstrably improves outcomes
  2. Prioritize transparency — show the agent’s planning steps explicitly
  3. Craft the ACI (agent-computer interface) — invest in tool documentation like you would in HCI. Test extensively. Poka-yoke your tools to make mistakes harder.

Agent Components (Weng)

Three pillars:

  1. Planning — task decomposition (CoT, Tree of Thoughts), self-reflection (ReAct, Reflexion)
  2. Memory — short-term (context window), long-term (vector store + retrieval)
  3. Tool Use — MRKL architecture, function calling, toolformer patterns 6

Memory Architecture

Human Memory LLM Equivalent Implementation
Sensory Embedding representations Text/image/audio → vectors
Short-term / Working In-context learning Context window (finite)
Long-term External vector store ANN retrieval (HNSW, FAISS, ScaNN)

Retrieval metrics: relevance, recency, importance (Generative Agents paper). 7

Key Challenges

  1. Finite context length — limits history, instructions, API context. Vector stores help but lose representation power vs full attention.
  2. Long-term planning — LLMs struggle to adjust plans on unexpected errors.
  3. Natural language interface reliability — formatting errors, rebellious behavior. Much agent demo code is format parsing.
  4. Compounding errors — autonomous agents can drift. Need guardrails, checkpoints, human-in-the-loop.

Relevance to Pluronymous

These patterns directly inform the HermQube + MKCTP agent design. Key considerations:

  • The substrate IS the shared memory + communication ground between agents
  • Agent-computer interface design (ACI) matters as much as the agents themselves
  • The chatroom is an agent-computer interface — tool definitions for messaging, presence, rooms need the same rigor
  • Field-deployed agents need sandboxing, guardrails, and human oversight checkpoints

  1. raw/articles/anthropic-building-effective-agents-2024.md 

  2. raw/articles/anthropic-building-effective-agents-2024.md 

  3. raw/articles/anthropic-building-effective-agents-2024.md 

  4. raw/articles/anthropic-building-effective-agents-2024.md 

  5. raw/articles/anthropic-building-effective-agents-2024.md 

  6. raw/articles/lilianweng-llm-agents-2023.md 

  7. raw/articles/lilianweng-llm-agents-2023.md 


Write a comment