Overview

1 The agent paradigm shift

This chapter introduces a shift in how software is designed when an AI model, rather than a developer, chooses actions at runtime. It opens with the lesson that a seemingly reasonable agent can still make the wrong architectural choice, such as rebuilding an existing rollout utility instead of reusing the authoritative one. That example motivates the book’s central idea: building agents is not just about writing prompts or calling tools, but about designing the harness around the model so it can perceive the right context, make bounded decisions, use memory and tools safely, and produce results that are reliable inside a real system.

The chapter defines an agent as a language-model-driven software system operating within an engineered harness, and it contrasts this with ordinary pipelines whose control flow is fixed in advance. In agent systems, the model spends context, compute, and action opportunities, while the harness budgets and constrains those resources. The text also explains why classical design patterns do not fully transfer: their assumptions often place decision-making in the hands of the developer, whereas agent systems move those decisions into the runtime. This leads to a new vocabulary built around cognitive functions such as perception, memory, reasoning, action, reflection, collaboration, and governance.

The chapter further shows that agent engineering is shaped by three core uncertainties: output uncertainty, behavioral uncertainty, and environmental uncertainty. These conditions make agents more like distributed systems than traditional deterministic programs, so familiar ideas such as isolation, reconciliation, durable state, and budgets still matter, but must be adapted to probabilistic decision-making. The chapter closes by positioning the book as a practical guide for engineers through the Argus code review agent, where each chapter adds another capability, and by emphasizing that specification, constraints, and evaluation matter more than code alone when building trustworthy agent systems.

A deterministic pipeline has a fixed sequence, while an agent loop is a model-driven cycle in which reasoning and planning may interleave during execution.
How four GoF patterns break and what replaces them in agent systems.
Selected pattern lineages, from GoF through distributed systems to agent systems. The arrows trace recurring design pressures across distinct implementations.
The seven cognitive functions for processing a pull request review. The arrows show information flow. The dashed box shows governance controls reaching across the pipeline; the four governance patterns retain their matrix coordinates.
The two creations in agent engineering: specification as mental creation, running agent as physical creation.

Summary

  • Agent architecture is bounded resource allocation under uncertainty: the model spends; the harness budgets.
  • Agent systems introduce three fundamental uncertainties that break the assumptions underlying classical design patterns: output (same prompt, different responses), behavioral (agent selects its own strategy at runtime), and environmental (the world changes between observations). Treating uncertainty as the default operating condition is the paradigm shift.
  • Agent design patterns inherit recurring engineering pressures from earlier systems. Cache hierarchies inform tiered memory, circuit breakers inform loop detectors, and saga transactions inform plan-and-execute workflows. The medium has changed from deterministic code to probabilistic language models, while the pressures recur. Experienced engineers already have the right intuitions. This book gives them the vocabulary to design, review, and communicate about agent architectures within their teams.
  • The seven cognitive functions (perception, memory, reasoning, action, reflection, collaboration, and governance) organize 28 named patterns across six execution topologies. This two-dimensional framework (what the agent does × how it does it) is the map for the rest of this book.
  • Design inversion treats the specification as source code and the agent as its compiler. Past the implementation plateau, further code improvements yield diminishing returns, so the developer's role shifts toward designing specifications that constrain the generated behavior.
  • Token leverage, the ratio of output quality to token cost, helps teams evaluate designs alongside reliability and latency, especially when usage scales.

FAQ

What is an agent in this book’s terminology?A software system where a language model chooses the next action at runtime inside an engineered harness. The harness supplies context, memory, permissions, budgets, and stopping conditions.
How is an agent different from a normal LLM-powered pipeline?A fixed pipeline follows developer-defined steps, while an agent has model-directed control flow. The model decides what to do next within boundaries set by the harness.
What is the role of the harness in an agent system?The harness is the engineered environment around the model. It bounds autonomy by managing tools, context, memory, permissions, and limits so the model’s decisions stay controllable and reliable.
Why does the chapter say “the model spends; the harness budgets”?The model consumes context, compute, and action opportunities to pursue a task. The harness allocates and constrains those scarce resources so the system can operate safely and predictably.
What are the three main uncertainties in agent systems?Output uncertainty, behavioral uncertainty, and environmental uncertainty. Outputs can vary across calls, the agent’s runtime decisions are not fully predictable, and the world can change between observations.
Why don’t classical GoF patterns fully solve agent design problems?Because GoF patterns assume a human developer makes structural decisions at design time. In agent systems, the model makes many of those decisions at runtime, so the architecture must account for probabilistic behavior and open-ended action selection.
What are some examples of classical patterns that break in agent systems?The chapter highlights Singleton, Factory, Observer, and Strategy. Each assumes something that no longer holds: global consistency, fixed product types, reliable synchronous delivery, or human-selected strategy choice.
How do agent design patterns relate to older engineering patterns?They have engineering ancestors in object-oriented and distributed-systems design. Ideas like isolation, durable state, reconciliation, budgets, and failure containment carry over, but the mechanisms are adapted for model-driven runtime decisions.
What are the seven cognitive functions used to organize agent design?Perception, memory, reasoning, action, reflection, collaboration, and governance. The book uses these as a reference architecture for organizing agent patterns and responsibilities.
Why does the chapter use Argus as an example agent?Argus is a code review agent that makes the design concrete. It shows how perception, memory, reasoning, action, reflection, collaboration, and governance combine in a real workflow, making the chapter’s architectural ideas easier to apply.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Designing AI Agents ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Designing AI Agents ebook for free