chapter two

2 Agent architecture and the two-axis map

 

This chapter covers

  • The seven cognitive modules and why agents need all seven
  • The Perception-Reasoning-Action loop and its compound error problem
  • Assembling General Agent Architecture from modules, runtime, and the external world
  • The two-dimensional pattern map that organizes every pattern in this book
  • Implementing Argus's PRA skeleton and running it against a real code diff
"Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over."

— Christopher Alexander, A Pattern Language (1977)

We’ve established why agent systems need new design patterns. Output, behavioral, and environmental uncertainties break the assumptions behind classical patterns. Every agent pattern traces its lineage to an engineering ancestor, and seven cognitive functions organize what agents do. This chapter establishes what those patterns operate on.

This chapter is also the geometric expansion of the premise we named before: bounded resource allocation under uncertainty. The seven cognitive modules name what gets allocated; the two axes, cognitive function and execution topology, name how the allocation is distributed. The 27 patterns ahead are 27 allocation strategies.

2.1 The anatomy of an agent

2.1.1 From four modules to seven

2.1.2 The agent capability stack: Why seven, not four

2.1.3 The cognitive engine: The Perception-Reasoning-Action loop

2.1.4 Compound error: Why loops amplify mistakes

2.2 General agent architecture

2.2.1 Cognitive modules and their information flows

2.2.2 Runtime virtual machine

2.2.3 The external world boundary

2.2.4 How production systems instantiate the architecture

2.3 The two-dimensional map: Cognitive function × execution topology

2.3.1 The execution topology axis

2.3.2 Why you need both dimensions

2.3.3 The complete pattern map

2.3.4 Scope and limitations of the map

2.3.5 The pattern selection card

2.3.6 How to read the rest of this book

2.4 Single-agent vs. multi-agent: When and why to scale

2.4.1 The single-agent sweet spot

2.4.2 When multi-agent becomes necessary

2.4.3 What multi-agent costs you

2.4.4 The scaling spectrum

2.5 The new contract: Progressive trust and guardrails

2.5.1 The trust spectrum: Four levels

2.5.2 Earning and losing trust

2.5.3 Guardrails as architecture