Agent Architecture/Single-Agent Patterns
★ OverviewIntermediate12 min

How to Design an Agent System

The decision framework for choosing between chains, single agents, and multi-agent systems — and how to scope your first agent correctly.

Quick Reference

  • Start with a deterministic chain; promote to an agent only when the task requires dynamic tool selection
  • Define the agent's scope with a clear system prompt, explicit tool list, and bounded iteration limit
  • Use the 'Can a human write a checklist?' test — if yes, use a chain; if no, use an agent
  • Design for observability from day one: structured logging, trace IDs, and LangSmith integration
  • Prototype with the strongest model (Claude Opus 4.6), then downgrade to Haiku/Sonnet once behavior is stable

Chain vs Agent — The Decision

The core question

Can the task be solved with a fixed sequence of steps? If yes → chain. If the agent needs to decide which tools to use and in what order at runtime → agent.

DimensionChainAgentMulti-Agent
Control flowFixed, deterministicDynamic, LLM-decidedMultiple LLMs coordinating
StepsAlways the sameVaries per inputVaries per input and per agent
ToolsNot needed or fixed5-10, selected by LLMPartitioned across agents
CostLow, predictableMedium, variableHigh, variable
Latency1 LLM call2-8 LLM calls5-20+ LLM calls
DebuggingEasy — linear traceMedium — loop traceHard — distributed trace
When to useSummarization, Q&A, RAGResearch, customer supportComplex orchestration, diverse domains

The golden rule: start with a chain. Promote to an agent only when the task requires the LLM to choose between tools at runtime. Promote to multi-agent only when a single agent's tool set exceeds 8-10 tools or the task spans multiple domains.