Overview

1 The agent paradigm shift

In this chapter, the central idea is that AI agent systems represent a shift from software where developers hard-code every branch to systems where a language model chooses actions at runtime inside an engineered harness. That harness supplies context, memory, permissions, budgets, and stopping rules, while the model provides flexibility and the harness provides reliability. The chapter uses a code review agent, Argus, to show how a real task is no longer just a pipeline of fixed steps, but a loop in which the system perceives evidence, decides what to do next, and adapts as new information appears.

The chapter also explains why existing software patterns are not enough on their own. Classic design patterns assume human-controlled decisions, known object types, and predictable delivery, but agent systems move those decisions inside the machine and into an open-ended, language-driven runtime. To make sense of this, the chapter introduces three major uncertainties: output uncertainty, where the model may answer differently each time; behavioral uncertainty, where the agent’s next move cannot be fully predicted in advance; and environmental uncertainty, where the outside world changes between observations. These pressures make reliability, state management, and tool use core architectural concerns rather than afterthoughts.

Finally, the chapter reframes agent engineering as a matter of specification, constraints, and evaluation. It presents seven cognitive functions—perception, memory, reasoning, action, reflection, collaboration, and governance—as a reference architecture for organizing design choices, and shows how Argus combines them in stages to review a pull request. The broader message is that agent engineering is less about writing the agent’s code and more about designing the boundaries in which it operates, including what it can see, what it can do, how it recovers from failure, and how it is judged. In that sense, the engineer becomes more like a gardener than a watchmaker, shaping conditions that let capable but unpredictable systems behave usefully and safely.

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.
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.
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.
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 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.
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 the agent paradigm shift described in Chapter 1?The agent paradigm shift is the move from software where developers predefine the control flow to systems where a language model selects the next action at runtime within an engineered harness. In this model, the engineer no longer specifies every branch; instead, they design the boundaries, constraints, memory, tools, and stopping rules that shape the agent’s decisions.
How is an agent different from a fixed LLM pipeline?A fixed LLM pipeline can call a model without becoming an agent if the developer still controls the full sequence. An agent is different because the model directs the control flow at runtime, choosing among tools, responses, or further reasoning steps based on observations and the task context.
What are the three main uncertainties in agent systems?Chapter 1 identifies three uncertainties: output uncertainty, behavioral uncertainty, and environmental uncertainty. Output uncertainty means the same prompt can yield different responses; behavioral uncertainty means the agent’s runtime decisions are not fully predictable in advance; environmental uncertainty means the world around the agent can change between observations.
Why don’t classical design patterns fully solve agent design problems?Classical patterns like Singleton, Factory, Observer, and Strategy assume that developers make the important design decisions at design time. In agent systems, those decisions are often made by the model at runtime, so the challenge shifts from encoding fixed logic to constraining and governing autonomous decision-making.
Why does the book say every agent pattern has an engineering ancestor?The book argues that agent patterns are descendants of earlier engineering patterns from object-oriented and distributed systems design. Ideas like isolation, reconciliation, durable state, and budgeted resources already existed; agent patterns adapt those principles to systems where the decision-maker is a probabilistic model.
What does the book mean by “the model spends; the harness budgets”?This means the model consumes context, compute, and action opportunities to solve the task, while the harness controls how those resources are allocated and limited. The harness decides what the model can see, what tools it can use, where state lives, and what counts as completion.
What are the seven cognitive functions used to describe agent architecture?The seven cognitive functions are perception, memory, reasoning, action, reflection, collaboration, and governance. The book uses these as a reference architecture to break agent design into reusable modules and to show how different patterns fit into different responsibilities.
Why is the code review agent Argus used as the running example?Argus is used because code review is a familiar engineering task that naturally involves context, memory, reasoning, tools, review, and governance. It makes abstract agent design choices concrete while still generalizing to other use cases like customer escalation or incident triage.
What is the role of governance in an agent system?Governance controls whether the agent is allowed to take certain actions, whether human approval is required, and how the system is audited. It helps ensure the agent operates within permission scope and that its decisions are observable, reviewable, and safe.
How does Chapter 1 frame the relationship between specification and code in agent engineering?Chapter 1 presents specification as the first creation and the running agent as the second creation. In this view, the specification defines acceptable behavior, constraints, and task structure, while the agent acts like a compiler that produces behavior from that specification.

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


Close
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 Designing AI Agents ebook for free
Close
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 Designing AI Agents ebook for free