2 Turn a task into an agent architecture
The chapter explains how to transform a business task into a workable agent architecture by starting from the task’s constraints: what the system must notice, remember, decide, change, and keep under human control. It frames agent design as a sequence of practical questions rather than a search for a single “best” model setup, and uses the Argus code-review agent as a running example to show how those choices become a reviewable architecture.
Its central organizing idea is a seven-part capability stack: perception, memory, reasoning, action, reflection, collaboration, and governance. The first four form core cognition, reflection adds a feedback path for checking and revising work, and collaboration plus governance address coordination and authority in production settings. The chapter emphasizes that these are not maturity levels; each task justifies a different mix of capabilities, and every added layer introduces cost, controls, and complexity that must be earned by the workload.
The chapter then connects those capabilities through a Perception-Reasoning-Action loop, a runtime layer, and an external-world boundary, showing how information, persistence, tools, and safety controls fit together. It introduces a two-axis map that pairs cognitive function with execution topology so teams can compare patterns by purpose, cost, latency, and failure mode, and it argues for starting with a single agent unless evidence shows a structural wall such as context overflow, specialization, parallelism, or adversarial review. The result is a disciplined way to choose trust boundaries, decide when to delegate, and build a minimal Argus skeleton that can grow only when later evidence justifies more architecture.
Agent capabilities build in layers: Core Cognition enables useful work, Reflection adds an explicit feedback path, and Collaboration plus Governance address coordination, authority, and production boundaries.
The Perception-Reasoning-Action loop with reflection and memory sub-loops. Observe Result is a phase of the loop, not an eighth module.
The general agent architecture. Seven cognitive modules, the runtime virtual machine, and the external world form a complete system. Arrows represent the primary, feedback, persistence, and lateral paths; Collaboration and Governance wrap the cognitive core.
The six execution flow shapes used as the map's X-axis. The diagrams show data flow; cognitive function supplies the design intent.
The two-axis map, with 28 named patterns across seven cognitive functions and six execution topologies.
The Pattern Selection Card. A one-page quick reference for moving from a business problem to a set of patterns.
Summary
- Use the seven cognitive modules to identify design concerns. Core Cognition enables useful work, Reflection adds an explicit feedback path, and Collaboration plus Governance address coordination, authority, and production boundaries.
- The PRA loop is the cognitive engine. Because errors compound across steps, designs should reduce unnecessary iterations, improve evidence at each step, verify intermediate results, and fail fast when the state is corrupt.
- The General Agent Architecture separates cognitive modules, runtime infrastructure, and the external world. Review it through four paths: primary flow, feedback, persistence, and collaboration. Make state, tool calls, permissions, and evaluation results observable.
- The two-axis map combines cognitive function with execution topology. Use it to compare candidate structures against cost, latency, failure modes, and trust boundaries. The Pattern Selection Card turns a business problem into a first-pass design.
- Start with one agent and scale only after hitting a structural wall: context pressure, distinct expertise, useful parallelism, or the need for an independent reviewer. When delegating, keep task ownership and integration explicit while giving sub-agents bounded local control.
- Grant autonomy per action, in proportion to reversibility and blast radius. Implement approval gates, bounded scope, override, and audit trails as runtime constraints. Trust should be earned through observed behavior and reversible after incidents.
FAQ
What is the main purpose of chapter 2 in Designing AI Agents?
Chapter 2 shows how to turn a business task into an agent architecture by identifying required capabilities, connecting them through a runtime loop, comparing execution structures, and deciding when to add delegation or governance.
What are the seven cognitive modules in the agent capability stack?
The seven modules are Perception, Memory, Reasoning, Action, Reflection, Collaboration, and Governance. Together, they describe the main design concerns of an agent system.
How do the inner, middle, and outer rings of the capability stack differ?
The inner ring covers core cognition: Perception, Memory, Reasoning, and Action. The middle ring adds Reflection for feedback and self-evaluation. The outer ring adds Collaboration and Governance for working across people, agents, tools, and authority boundaries.
What is the Perception-Reasoning-Action (PRA) loop?
The PRA loop is the agent’s core runtime cycle: it perceives evidence, reasons about the next step, acts, and then observes the result before repeating. It is the basic engine that drives agent work.
Why is Memory treated as a separate architectural concern from Reasoning?
Memory is separated so teams can independently design how state is stored, retrieved, and persisted across cycles. This makes it easier to tune retrieval policies, preserve evidence, and support long-running tasks without mixing storage concerns into reasoning itself.
What problem does the chapter highlight about long PRA loops?
The chapter explains compound error: even small per-step errors grow across many iterations. As the number of steps increases, overall success can drop sharply, which is why agent design should minimize loops, improve step accuracy, add checkpoints, and fail fast when needed.
When should you scale from one agent to multiple agents?
Start with one agent by default. Add more agents only when there is a clear structural wall, such as context overflow, specialization needs, parallel work, or the need for independent verification.
What are the main costs of multi-agent systems?
Multi-agent systems add coordination cost, error amplification risk, and debugging opacity. Each additional agent introduces more state, more communication, and more chances for context to be lost or misunderstood.
Why is Governance necessary in agent design?
Governance constrains what the agent can see, do, and change, especially when actions are irreversible or externally visible. It provides approval gates, action classification, audit trails, and human override so autonomy stays within safe bounds.
What is the Argus example used for in chapter 2?
Argus is a code review agent used to show how the chapter’s design sequence works in practice. The chapter uses Argus to demonstrate a minimal single-pass PRA loop, then shows how later chapters add perception, memory, reasoning depth, reflection, collaboration, and governance.
Designing AI Agents ebook for free