Chapter 2: Turn a task into an agent architecture
The introduction frames agent architecture as a set of choices driven by a business task and its constraints, rather than by a preferred pattern.
After this chapter you will be able to
- Task-Driven Architecture Choices. Explain why agent architecture should start with the business task and its constraints before selecting patterns. Describe the questions those constraints raise about the agent’s capabilities, acceptable failures, and human control.
- Task-shaped agent capabilities. Explain why turning an LLM with tools into a production agent architecture requires separating design concerns and letting the task determine how much capability each needs. Describe the concerns the section identifies: inputs to reasoning, checks on results, coordination of work, and governance of consequential actions.
- Seven distinct design responsibilities. Explain how the seven modules expose different architectural questions within one task, using the controlled-rollout change as an example.
- Three capability layers. Describe what Core Cognition, Meta-Cognition, and System Intelligence add to an agent design.
- Task justified capability choices. Justify which responsibilities to emphasize from the task's needs rather than treating the stack as a maturity ladder.
- Primary PRA runtime cycle. Trace a PRA cycle from perceiving evidence through reasoning about the next step, acting, and observing the result.
- Reflection feedback loop. Explain how reflection uses the observed result to decide whether to continue, revise, or stop.
- Cross-cycle memory loop. Describe what flows into memory across PRA cycles, what later cycles can retrieve, and why persistence alone is not learning.
- Compounding iteration errors. Explain why adding steps can sharply reduce a task’s overall success rate even when each step is fairly reliable.
- Four reliability levers. State the four responses to compounding errors and describe how each helps.
- Architecture as a design map. Explain how the General Agent Architecture helps turn a capability list into a system by separating cognitive modules, runtime infrastructure, and the external world.
- Perception to Reasoning Path. Trace how raw information passes through Perception to Reasoning, and explain why filtering and the choice of reasoning depth matter.
- Action Evidence and Effects. Distinguish evidence that an Action executed from evidence that it completed the intended task.
- Reflection Feedback Path. Trace how Action results reach Reflection and how that evaluation changes what happens next.
- Memory Persistence Path. Explain how modules use Memory across cycles and why stored information is not automatically fit to use.
- Governance Constraint Envelope. Explain how Governance constrains the modules and preserves accountability.
- Runtime VM and OS analogy. Explain where the runtime virtual machine sits in an agent architecture and how the operating-system analogy helps frame its responsibilities.
- External storage for lasting memory. Explain why an agent needs external storage for information required by later decisions.
- Harness boundaries and visibility. Distinguish the agent harness from cognitive decision-making and explain why runtime visibility matters.
- Read write risk asymmetry. Explain why the difference between reads and writes at the external boundary calls for greater scrutiny of consequential actions.
- Three runtime VM strategies. Distinguish extension-layered, sandbox-first, and context-engine-centric approaches to the runtime virtual machine using the production examples in the section.
- Workload driven architecture investment. Explain why production systems emphasize different parts of the reference architecture and relate the section's workload examples to appropriate areas of investment.
- Two-axis pattern map. Explain that the map compares patterns by cognitive function—what the agent needs to do—and execution topology—how data flows through the system.
- Constraint-led pattern comparison. Describe how to begin with the desired outcome and dominant constraint, use the map to find structures addressing that pressure, and compare candidates on cost, latency, failure modes, and trust boundaries.
- Topology and cognitive purpose. Distinguish an execution topology, which describes how work moves, from the cognitive function that gives the flow its design intent. Explain that the same flow shape can serve different purposes.
- Two-coordinate pattern identification. Explain why neither topology nor cognitive function alone identifies an agent pattern, and how using both coordinates clarifies the design choice.
- Pattern map coordinates. Explain how the map combines a cognitive function with an execution topology to locate candidate patterns after a baseline reveals a problem, and how those coordinates give engineers a shared way to name a design.
- Same-function pattern comparison. Describe how reading across one row compares different structures for the same cognitive function, using examples from the Reasoning row and their differing cost and latency profiles.
- Orthogonal map contribution. Explain that the book combines established cognitive functions and flow shapes into a shared, two-dimensional coordinate system rather than presenting those elements as new inventions.
- Map boundaries within design. Describe the important design concerns the two-dimensional map leaves out and explain why the grid is an organizing principle rather than a complete design framework.
- Conditional pattern suitability. Explain why a pattern’s place on the map does not make it universally suitable and when the framework itself should be revised.
- Three-panel selection path. Trace how ASSESS, ROUTE, and SELECT turn a task into an initial architecture: rate demand for each cognitive function, choose a topology using collaboration demand and time budget, then find patterns at the function-topology coordinates.
- Conditional token leverage comparison. Explain when to compare candidate patterns by token leverage and why, among candidates with the same required outcome, authority boundary, and acceptance evidence, the lower-token design is preferable if it achieves the required quality.
- Task-Fit Pattern Topology. Explain that the map’s rows represent cognitive functions and its columns represent dependency shapes, not stages of maturity. Describe how a simple rename and a suspected concurrency bug can call for different reasoning structures.
- Single-agent default and scaling triggers. Explain why the design should start with one agent and identify the structural boundaries that can justify adding agents.
- Costs of adding agents. Explain why adding agents is expensive to reverse and what tradeoff to make before scaling.
- Single-agent suitability conditions. Describe the four conditions that favor a single agent: the task fits in one context window, benefits from one consistent mental model, uses sequential tool calls, and needs only one expertise.
- Single-agent default rationale. Explain why the burden of proof is on a multi-agent design when all four single-agent conditions hold.
- Single-agent structural limits. Explain why a single-agent design may reach a structural wall before a multi-agent structure is worth testing.
- Structural walls and collaboration patterns. Distinguish the four structural walls and match each to the collaboration pattern the section recommends evaluating.
- Three costs of multiple agents. Explain how adding agents creates coordination cost, error amplification, and debugging opacity, with a concrete cause for each.
- Evidence for adding agents. Justify adding agents only when a measured single-agent limitation outweighs delegation’s coordination cost, and describe how to check the trade-off.
- Proportionate action authority. Explain why autonomy is assigned per action rather than per agent, and how reversibility, scope, and consequences determine approval and authority.
- Evidence-based trust lifecycle. Describe how an agent's permitted autonomy can change with observed performance and incidents.
- Enforceable trust controls. Describe the controls that make an action-level trust boundary enforceable during execution.
- Runtime guardrail separation. Explain why guardrails operate outside model reasoning and what kinds of checks they apply.
- Evidence-Based Argus Architecture. Explain why Argus starts with only the capabilities the task needs, connected by one Perception-Reasoning-Action (PRA) loop, while leaving room for later additions.
- Argus single-pass PRA skeleton. Trace Argus’s Perception → Reasoning → Action pass and explain why its intentionally limited capabilities make the architecture visible.
- Seeded vulnerability check. Describe how to test Argus with the sample diff in argus/core.py and interpret a missed SQL injection or a correct finding accompanied by two false positives.
- Framework independence of PRA. Explain how the Argus PRA skeleton remains the same across frameworks while each implementation exposes a different amount of the loop.
What it builds on
- Designing agents through cognitive functions (chapter 1) · Introduces designing agents by separating cognitive functions.
Section by section
Introduction
The introduction frames agent architecture as a set of choices driven by a business task and its constraints, rather than by a preferred pattern.
- Task-Driven Architecture Choices: Explain why agent architecture should start with the business task and its constraints before selecting patterns. Describe the questions those constraints raise about the agent’s capabilities, acceptable failures, and human control.
Why it matters: Starting with the task keeps architectural choices tied to the work and risks the system must handle.
Key terms: business task, constraints, pattern selection
2.1 Choose the capabilities the task requires
This section frames agent architecture as a set of design concerns whose required capabilities depend on the task.
- Task-shaped agent capabilities: Explain why turning an LLM with tools into a production agent architecture requires separating design concerns and letting the task determine how much capability each needs. Describe the concerns the section identifies: inputs to reasoning, checks on results, coordination of work, and governance of consequential actions.
Why it matters: This framing helps you choose capabilities for a task rather than treating every agent as the same LLM-and-tools setup.
Key terms: capability, architecture, reasoning, evaluation, collaboration, governed
2.1.1 The agent capability stack
The section presents seven cognitive modules as a task-specific design checklist, groups them into three layers, and cautions that adding modules must be justified by the task rather than treated as progress toward maturity.
- Seven distinct design responsibilities: Explain how the seven modules expose different architectural questions within one task, using the controlled-rollout change as an example.
Why it matters: The checklist helps you notice design obligations that a description of the feature alone can hide. - Three capability layers: Describe what Core Cognition, Meta-Cognition, and System Intelligence add to an agent design.
Why it matters: The layers clarify whether a design concern is about doing the work, revising it from feedback, or operating across participants and authority boundaries. - Task justified capability choices: Justify which responsibilities to emphasize from the task's needs rather than treating the stack as a maturity ladder.
Why it matters: Choosing responsibilities by task and risk avoids both missing necessary controls and adding unjustified complexity.
Key terms: cognitive modules, Perception, Memory, Reasoning, Action, Reflection, Core Cognition, Meta-Cognition, System Intelligence, design responsibilities
2.1.2 Design the cognitive engine: The Perception-Reasoning-Action loop
This section explains how an agent’s PRA cycle, reflection, and memory work across iterations, and why reliable architecture must limit compounding errors.
- Primary PRA runtime cycle: Trace a PRA cycle from perceiving evidence through reasoning about the next step, acting, and observing the result.
Why it matters: This cycle is the basic shape of the agent architecture used throughout the chapter. - Reflection feedback loop: Explain how reflection uses the observed result to decide whether to continue, revise, or stop.
Why it matters: Reflection makes an observed outcome useful for choosing what happens next. - Cross-cycle memory loop: Describe what flows into memory across PRA cycles, what later cycles can retrieve, and why persistence alone is not learning.
Why it matters: Separating memory from reasoning makes storage and retrieval independently adjustable rather than treating saved experience as automatic learning. - Compounding iteration errors: Explain why adding steps can sharply reduce a task’s overall success rate even when each step is fairly reliable.
Why it matters: Longer loops can cost both reliability and tokens, even when individual steps look strong. - Four reliability levers: State the four responses to compounding errors and describe how each helps.
Why it matters: These four levers give engineers a way to judge whether a pattern makes an agent loop more reliable.
Key terms: PRA loop, Perception, Reasoning, Action, Observe Result, reflection loop, self-evaluation, PRA cycle, memory loop, persistence
2.2 Turn capabilities into a system architecture
This section introduces the General Agent Architecture as a way to make capability-to-system design decisions visible and explains how to read its main boundaries and arrows.
- Architecture as a design map: Explain how the General Agent Architecture helps turn a capability list into a system by separating cognitive modules, runtime infrastructure, and the external world.
Why it matters: This gives you a place to locate system-level choices rather than treating capabilities as a complete design. - Diagram flows and boundaries: Describe what the arrows, dashed borders, and governance border convey in Figure 2.3.
Why it matters: Reading the diagram’s boundaries correctly helps distinguish information flow from containment and governance reach.
Key terms: General Agent Architecture, cognitive modules, runtime infrastructure, external world, Governance controls, Runtime, information flow, containment
2.2.1 How information flows through cognitive modules
The section connects seven cognitive modules into an agent architecture by tracing the primary, feedback, persistence, and collaboration paths under governance constraints.
- Perception to Reasoning Path: Trace how raw information passes through Perception to Reasoning, and explain why filtering and the choice of reasoning depth matter.
Why it matters: What the agent notices, and how much effort it spends reasoning about it, shapes the action it proposes. - Action Evidence and Effects: Distinguish evidence that an Action executed from evidence that it completed the intended task.
Why it matters: An agent must not mistake a tool's successful return for proof that its task succeeded. - Reflection Feedback Path: Trace how Action results reach Reflection and how that evaluation changes what happens next.
Why it matters: Feedback lets observed results redirect the agent instead of leaving it committed to its first plan. - Memory Persistence Path: Explain how modules use Memory across cycles and why stored information is not automatically fit to use.
Why it matters: Persistence helps the agent carry information forward without treating every stored candidate as a trustworthy lesson. - Collaboration Lateral Path: Describe when separate contributors help and what must govern their exchanges.
Why it matters: Separate contributors help only when their work can be handed off and integrated clearly. - Governance Constraint Envelope: Explain how Governance constrains the modules and preserves accountability.
Why it matters: Governance limits what the agent can do and makes its actions accountable after the fact.
Key terms: Perception, context engineering, Reasoning, primary path, PRA loop, Action, execution evidence, task completion, intended effect, Reflection
2.2.2 Runtime virtual machine
This section explains the runtime virtual machine as the non-cognitive infrastructure that supports, connects, and makes an agent’s decisions inspectable in production.
- Runtime VM and OS analogy: Explain where the runtime virtual machine sits in an agent architecture and how the operating-system analogy helps frame its responsibilities.
Why it matters: The analogy helps you separate the model’s decisions from the infrastructure needed to run them safely. - External storage for lasting memory: Explain why an agent needs external storage for information required by later decisions.
Why it matters: Without external persistence, information a later decision needs may not survive beyond the available context. - MCP tool interface: Describe how the MCP Host gives an agent a uniform way to access different tools.
Why it matters: A uniform interface lets one agent use varied external capabilities without integrating each one differently. - Skills and progressive disclosure: Describe what an Agent Skill contains and how its contents are exposed to the agent.
Why it matters: Skills package task guidance while avoiding the need to load every Skill’s full instructions at once. - Harness boundaries and visibility: Distinguish the agent harness from cognitive decision-making and explain why runtime visibility matters.
Why it matters: Making both decisions and their runtime environment explicit helps teams investigate failures and judge how much autonomy to allow.
Key terms: runtime virtual machine, LLM, context window, operating-system analogy, anterograde amnesia, short-term state, durable files, state stores, MCP Host, Model Context Protocol
2.2.3 The external world boundary
This section identifies who and what interacts with an agent across its system boundary and explains why consequential actions need governance.
- External boundary interactions: Describe the three kinds of entities outside the agent system boundary and how they interact with the agent.
Why it matters: The boundary shows where the agent meets people, other agents, and systems it can affect. - Interagent interface choice: Explain when A2A is useful and why a simpler interface may suffice for a small system.
Why it matters: The interface should match the coordination boundary without mistaking capability descriptions for policy enforcement. - Read write risk asymmetry: Explain why the difference between reads and writes at the external boundary calls for greater scrutiny of consequential actions.
Why it matters: Governance is an architectural response to the real-world effects of agent actions, not an optional add-on.
Key terms: external world, agent system boundary, Human users, Other agents, Digital environment APIs, Governance, Agent-to-Agent (A2A), Agent Cards, runtime, code-level interface
2.2.4 How production systems instantiate the architecture
This section compares production runtime strategies and shows why agent architectures invest selectively according to workload.
- Three runtime VM strategies: Distinguish extension-layered, sandbox-first, and context-engine-centric approaches to the runtime virtual machine using the production examples in the section.
Why it matters: The runtime strategy reveals which production constraint a system is designed to address. - Workload driven architecture investment: Explain why production systems emphasize different parts of the reference architecture and relate the section's workload examples to appropriate areas of investment.
Why it matters: Choosing what to strengthen first makes an architecture more responsive to its actual workload than trying to maximize every module.
Key terms: runtime virtual machine, extension-layered, Plugins, sandbox-first, context-engine-centric, Context Engine, reference model, Perception, Governance, Memory
2.3 Use the two-axis map to compare pattern choices
This section introduces a two-axis map for comparing agent patterns against a task’s needs and constraints.
- Two-axis pattern map: Explain that the map compares patterns by cognitive function—what the agent needs to do—and execution topology—how data flows through the system.
Why it matters: The two axes help you compare structures without treating the agent’s job and its data flow as the same decision. - Constraint-led pattern comparison: Describe how to begin with the desired outcome and dominant constraint, use the map to find structures addressing that pressure, and compare candidates on cost, latency, failure modes, and trust boundaries.
Why it matters: Starting from the task’s pressure keeps pattern selection tied to the problem and its operating constraints.
Key terms: cognitive function, execution topology, Y-axis, X-axis, outcome, dominant constraint, cost, latency, failure modes, trust boundaries
2.3.1 The execution topology axis
This section defines execution topology as the shape of work flow, distinguishes it from cognitive purpose, and adds Hierarchy as a sixth flow shape.
- Topology and cognitive purpose: Distinguish an execution topology, which describes how work moves, from the cognitive function that gives the flow its design intent. Explain that the same flow shape can serve different purposes.
Why it matters: Separating flow from purpose helps you compare agent designs without mistaking a shared structure for a shared job. - Framework-neutral hierarchy topology: Describe why the book uses six neutral topology names and how Hierarchy represents multi-level delegation.
Why it matters: A shared vocabulary makes delegation structures and their authority and failure modes easier to discuss across frameworks.
Key terms: execution topology, cognitive function, Evaluator-Optimizer loop, Hierarchy, six neutral topology names, multi-level delegation
2.3.2 Why you need both dimensions
This section shows why agent patterns need both a cognitive-function coordinate and an execution-topology coordinate to distinguish their structure and failure modes.
- Two-coordinate pattern identification: Explain why neither topology nor cognitive function alone identifies an agent pattern, and how using both coordinates clarifies the design choice.
Why it matters: A two-coordinate description makes a pattern choice more precise than a broad label such as “orchestrator-workers” or “better reflection.” - Evaluation flows and failure modes: Distinguish the three evaluation flows by what each does and the failure mode associated with it.
Why it matters: The three flows show why superficially similar evaluation work needs different descriptions and different checks for failure.
Key terms: topology, cognitive function, two coordinates, failure modes, trade-offs, Generator-Critic, Iterative Hypothesis Testing, Adversarial Review, rubber-stamps, confirmation bias
2.3.3 The complete pattern map
This section shows how the two-axis pattern map helps engineers find, compare, and discuss design options while treating empty cells as questions rather than impossibilities.
- Pattern map coordinates: Explain how the map combines a cognitive function with an execution topology to locate candidate patterns after a baseline reveals a problem, and how those coordinates give engineers a shared way to name a design.
Why it matters: The coordinates turn a diagnosed problem into a focused pattern search and a concise design description. - Same-function pattern comparison: Describe how reading across one row compares different structures for the same cognitive function, using examples from the Reasoning row and their differing cost and latency profiles.
Why it matters: Comparing structures within a row makes their practical trade-offs visible. - Meaning of empty cells: Explain what an empty map cell does and does not claim, and why it calls for analysis before adding complexity.
Why it matters: It prevents treating a gap in the catalog as either a prohibition or an invitation to add complexity without evidence.
Key terms: cognitive functions, execution topologies, coordinate, Navigation, Communication, Reasoning row, Chain-of-Thought, Complexity-Based Routing, Parallel Exploration, Iterative Hypothesis Testing
2.3.4 Scope and limitations of the map
This section explains what the two-axis map contributes, what it leaves out, and why its pattern choices must remain conditional and revisable.
- Orthogonal map contribution: Explain that the book combines established cognitive functions and flow shapes into a shared, two-dimensional coordinate system rather than presenting those elements as new inventions.
Why it matters: It helps you use the grid as a way to compare designs without assuming every cell is valuable. - Map boundaries within design: Describe the important design concerns the two-dimensional map leaves out and explain why the grid is an organizing principle rather than a complete design framework.
Why it matters: A location on the grid cannot settle design decisions involving risks or constraints the grid does not show. - Conditional pattern suitability: Explain why a pattern’s place on the map does not make it universally suitable and when the framework itself should be revised.
Why it matters: It keeps pattern selection grounded in task constraints and lets the map improve when experience exposes a poor fit.
Key terms: cognitive axis, orthogonal organization, shared coordinate system, two-dimensional map, autonomy level, trust boundaries, failure modes, cost constraints, latency budgets, bounded context
2.3.5 The pattern selection card
The section uses a three-panel card to turn a business problem into a testable agent architecture, then compares suitable pattern choices by token cost.
- Three-panel selection path: Trace how ASSESS, ROUTE, and SELECT turn a task into an initial architecture: rate demand for each cognitive function, choose a topology using collaboration demand and time budget, then find patterns at the function-topology coordinates.
Why it matters: The card gives you a way to make pattern choices that follow from the task instead of choosing patterns by name alone. - Argus starting architecture: Describe how the card yields an initial design for read-only Argus: its heavy demands are Perception, Reasoning, and Reflection; its light or absent collaboration favors one agent; and SELECT supplies three candidate patterns.
Why it matters: Argus shows what it looks like to apply the card to a concrete task without treating the result as settled. - Conditional token leverage comparison: Explain when to compare candidate patterns by token leverage and why, among candidates with the same required outcome, authority boundary, and acceptance evidence, the lower-token design is preferable if it achieves the required quality.
Why it matters: A cheaper pattern is useful only if it still meets the task’s quality and authority requirements.
Key terms: Pattern Selection Card, ASSESS, ROUTE, SELECT, cognitive function, function-topology coordinates, Argus, Perception, Reasoning, Reflection
2.3.6 How to read the rest of this book
Explains how to read the pattern map and choose a topology based on the task rather than treating its columns as a progression.
- Task-Fit Pattern Topology: Explain that the map’s rows represent cognitive functions and its columns represent dependency shapes, not stages of maturity. Describe how a simple rename and a suspected concurrency bug can call for different reasoning structures.
Why it matters: The map helps you select a structure that fits the problem instead of defaulting to a more elaborate one.
Key terms: cognitive functions, dependency shapes, topology, Chain, Route, Parallel
2.4 Decide when to scale beyond one agent
This section sets a one-agent default and explains when evidence and expected benefits justify the costs of adding agents.
- Single-agent default and scaling triggers: Explain why the design should start with one agent and identify the structural boundaries that can justify adding agents.
Why it matters: A clear scaling trigger helps avoid adding coordination overhead without a reason. - Costs of adding agents: Explain why adding agents is expensive to reverse and what tradeoff to make before scaling.
Why it matters: Scaling changes the system’s architecture as well as its performance.
Key terms: one agent, structural boundary, coordination cost, state ownership, communication, observability, error handling, latency, debugging paths
2.4.1 Start with the single-agent default
This section sets out when one agent should remain the default instead of adding multiple agents.
- Single-agent suitability conditions: Describe the four conditions that favor a single agent: the task fits in one context window, benefits from one consistent mental model, uses sequential tool calls, and needs only one expertise.
Why it matters: These conditions help you avoid adding agents when the task does not benefit from them. - Single-agent default rationale: Explain why the burden of proof is on a multi-agent design when all four single-agent conditions hold.
Why it matters: Extra agents should justify their added complexity rather than be the automatic starting point.
Key terms: context window, consistent mental model, sequential, one expertise, PRA loop, coherent state, burden of proof
2.4.2 Scale only after hitting a structural wall
This section identifies the structural limits that justify testing a multi-agent design and maps each limit to a collaboration pattern.
- Single-agent structural limits: Explain why a single-agent design may reach a structural wall before a multi-agent structure is worth testing.
Why it matters: The reason for adding agents should be a constraint in the task, not an assumption that more agents are always better. - Structural walls and collaboration patterns: Distinguish the four structural walls and match each to the collaboration pattern the section recommends evaluating.
Why it matters: Naming the actual wall helps you evaluate the collaboration pattern suited to it.
Key terms: single-agent design, context window, reasoning history, PRA loop, multi-agent structure, context overflow, expertise specialization, parallelism, adversarial verification, Hierarchical Delegation
2.4.3 What multi-agent costs you
This section explains the costs of adding agents, when those costs are justified, and how a primary agent can retain integration authority while delegating bounded work.
- Three costs of multiple agents: Explain how adding agents creates coordination cost, error amplification, and debugging opacity, with a concrete cause for each.
Why it matters: More agents can make a system slower, less reliable, and harder to diagnose rather than simply increasing its capacity. - Evidence for adding agents: Justify adding agents only when a measured single-agent limitation outweighs delegation’s coordination cost, and describe how to check the trade-off.
Why it matters: The decision to delegate should improve measured results enough to pay for its overhead. - Primary agent with bounded sub-agents: Describe the arrangement in which a primary agent retains task decomposition, shared state, and final integration while bounded sub-agents execute assigned work.
Why it matters: This arrangement adds capacity while keeping responsibility for the overall task in one place.
Key terms: coordination cost, error amplification, debugging opacity, measured single-agent limitation, task success, latency, token cost, debugging effort, primary agent, bounded sub-agents
2.5 Set trust boundaries before granting autonomy
This section explains how to grant agents only the action-level authority they need, adjust trust from observed behavior, and enforce boundaries outside model reasoning.
- Proportionate action authority: Explain why autonomy is assigned per action rather than per agent, and how reversibility, scope, and consequences determine approval and authority.
Why it matters: Action-level limits reduce potential damage without making every routine step wait for a person. - Evidence-based trust lifecycle: Describe how an agent's permitted autonomy can change with observed performance and incidents.
Why it matters: Autonomy can grow when evidence supports it and shrink when an incident shows the boundary was insufficient. - Enforceable trust controls: Describe the controls that make an action-level trust boundary enforceable during execution.
Why it matters: A trust policy only protects the system if it still applies while the agent is acting and leaves evidence for review. - Runtime guardrail separation: Explain why guardrails operate outside model reasoning and what kinds of checks they apply.
Why it matters: A model mistake should not be able to bypass the rules governing what the agent may do.
Key terms: autonomy, reversibility, blast radii, authority, approval rules, trust, review, promote, demote, approval gates
2.6 Apply the decisions: The Argus skeleton
This section introduces Argus as a minimal PRA-loop architecture that can grow when evidence justifies added complexity.
- Evidence-Based Argus Architecture: Explain why Argus starts with only the capabilities the task needs, connected by one Perception-Reasoning-Action (PRA) loop, while leaving room for later additions.
Why it matters: This gives Argus a working starting point without committing to complexity before it is needed.
Key terms: minimum capabilities, PRA loop, extension points
2.6.1 The PRA loop in 50 lines
Shows how Argus’s minimal, single-pass review maps to Perception, Reasoning, and Action.
- Argus single-pass PRA skeleton: Trace Argus’s Perception → Reasoning → Action pass and explain why its intentionally limited capabilities make the architecture visible.
Why it matters: This baseline lets you see where added capabilities fit without mistaking them for a different fundamental loop.
Key terms: Argus, Perception, Reasoning, Action, PRA loop, single-pass prompt
2.6.2 Try it yourself
This subsection uses a deliberately vulnerable sample diff to check Argus’s review output and identify two possible failure modes.
- Seeded vulnerability check: Describe how to test Argus with the sample diff in argus/core.py and interpret a missed SQL injection or a correct finding accompanied by two false positives.
Why it matters: A known vulnerability gives you a concrete way to spot both missed findings and false alarms in Argus’s output.
Key terms: argus/core.py, SQL injection vulnerability, false positives, Generator-Critic loop
2.6.3 The same pattern, different frameworks
Shows that the same Argus Perception-Reasoning-Action (PRA) architecture can be implemented in different frameworks, with different parts of the loop exposed.
- Framework independence of PRA: Explain how the Argus PRA skeleton remains the same across frameworks while each implementation exposes a different amount of the loop.
Why it matters: It helps you separate an architectural choice from a framework's implementation conveniences.
Key terms: PRA loop, Claude SDK, OpenAI Agents SDK, Runner.run_sync(), LangGraph
2.7 Summary
2.8 References
This section lists the sources cited in the chapter on turning a task into an agent architecture.
Where this is used later
- What is reflection? (chapter 7) · Develops reflection as a distinct agent function.
- What is memory? State, persistence, and knowledge across sessions (chapter 4) · Examines memory, persistence, and knowledge across sessions in greater depth.
- Pattern: Context triage (chapter 3) · Develops Context Triage as a way to provide useful context and reduce unnecessary cycles.
- The context window as a treatment budget (chapter 3) · Develops the finite-context constraint on Perception.
- Pattern: Complexity-Based Routing (chapter 5) · Develops decisions about how much reasoning a task warrants.
- How production agents solve this (chapter 3) · Assumes that information flows into the agent's cognitive modules.
- Success has layers (chapter 6) · Develops the distinct layers of action success.
- (chapter intro) (chapter 5) · Information flowing through an agent's cognitive modules.
Concepts explained in this chapter
- cognitive moduleA separable agent subsystem responsible for a cognitive function such as perception, memory, reasoning, action, reflection, or collaboration.
- actionAn agent capability for executing external operations or producing artifacts in response to reasoning.
- perceptionAn agent capability for identifying relevant information from inputs and loading context for subsequent processing.
- reasoningAn agent capability for evaluating information, forming hypotheses, and selecting conclusions or actions.
- collaborationAn agent capability for coordinating information or activity with other agents or humans.
- governanceThe agent capability and control framework for enforcing policies, constraints, oversight, and accountability.
- ReActReAct is an agent technique that interleaves language-model reasoning with actions to interact with an environment.
- memoryAn agent capability for retaining or retrieving information across or within tasks.
- reflectionAn agent capability for inspecting and revising its own intermediate results or proposed actions.
- compound errorA compound error is an overall failure produced when errors in successive agent roles or processing stages accumulate or cascade.
- execution topologyA structural arrangement that determines how steps or agents are organized and executed in an agent system.
- approval gateA control point that determines whether an operation may proceed autonomously or requires human authorization.
- agent architectureThe design of an agent system's model, control, constraints, resources, and execution mechanisms.
- complexity-based routingA routing pattern that selects an agent's reasoning policy and resource path according to request properties such as difficulty and consequence.
- metacognitionMeta-cognition is the ability of an agent to evaluate and improve its own cognitive activities or outputs.
- Pattern Selection CardA book-specific aid for choosing among recurring agent execution topologies.
- autonomy-level classificationThe degree to which an agent can make decisions and take actions without human intervention or authorization.
- cognitive functionA recurring responsibility in an agent architecture, such as perception, memory, reasoning, or action.
- context triageAn agent pattern that prioritizes relevant context and avoids loading irrelevant material to reduce unnecessary processing cycles.
- multi-agent systemA software system in which multiple agents coordinate or work independently to perform tasks.
- ArgusArgus is the code review agent built as the book's progressively developed reference system.
- agent loopAn iterative agent-control pattern in which an agent perceives, reasons, acts, and reflects, with subsequent steps selected dynamically.
- progressive trustA governance approach in which an agent receives increasing autonomy as it demonstrates reliable behavior.
- iterative hypothesis testingAn evaluation pattern in which successive passes propose hypotheses and test them against evidence.
- adversarial thinkingAn adversarial review is a review approach that examines work from a challenging or opposing perspective.
- MCP hostAn MCP host is an agent runtime component that connects an agent to Model Context Protocol capabilities and manages their use.
- agent skillA packaged agent capability that specifies how to perform a class of tasks, including relevant tools and workflow guidance.
- generator-critic loopA pattern in which a generator produces a candidate result and a critic evaluates it to guide revision or delivery.
- subagentAn agent assigned a bounded portion of a larger task or delegated plan.
- hierarchical coordinationA collaboration pattern that delegates bounded portions of work to agents arranged hierarchically.
- cognitive axisA dimension of the book's design framework that organizes agent cognitive functions.
- evaluationEvaluation is the systematic assessment of a result against criteria for quality, correctness, or suitability.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
