liveBook · Manning

Agent architecture

As explained in Designing AI Agents

The design of an agent system's model, control, constraints, resources, and execution mechanisms.

Agent architecture is the design of bounded resource allocation under uncertainty. The model chooses actions at runtime; the harness budgets context, compute, action opportunities, and trust. It also defines what the agent may read or change, where durable state lives, and what evidence counts as completion. section 1.2

Figure 1.1 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.

Contrast a fixed pipeline with a model-directed loop, where reasoning and planning can interleave as execution proceeds. section 1.2

Design for three uncertainties: outputs can vary for the same prompt, the agent can select its own strategy, and the environment can change between observations. The engineer’s leverage shifts from specifying every branch to constraining and verifying the decision space. section 1.2 section 1.5

Turn a task into a reviewable architecture:

  • Start with the task, acceptable failures, and where people must retain control. Identify what the agent must perceive, remember, decide, and change before selecting patterns. section 2.0
  • Connect capabilities through a perception-reasoning-action loop. Separate cognitive functions from runtime infrastructure and the external world; review primary flow, feedback, persistence, and collaboration. section 2.0 section 2.7
  • Compare execution structures by cost, latency, failure modes, and trust boundaries. Start with one agent; delegate when context pressure, distinct expertise, useful parallelism, or independent review creates a structural need. section 2.7
  • Make state, tool calls, permissions, and evaluation results observable. Verify intermediate results, reduce unnecessary iterations, and fail fast when state is corrupt. section 2.7
  • Set autonomy per action according to reversibility and blast radius. Enforce bounded scope, approval gates, override, and audit trails in the runtime. section 2.7

Evaluate designs on reliability and latency as well as token leverage: output quality relative to token cost. Loading a document or spawning a sub-agent spends resources, so added capability must justify its cost and failure modes. section 1.2 section 1.5

Code review agent

For Argus, a code review agent, begin with the review task and its constraints, identify the required capabilities, and connect them through a first perception-reasoning-action loop against a code diff. The resulting design should make runtime ownership and the failures it aims to control reviewable. section 2.0

How Designing AI Agents covers it

How deep it goes
Develops a design sequence covering capabilities, runtime boundaries, execution structures, delegation, observability, and governance.
Examples
Uses Argus, a code review agent, to sketch an architecture and run a first perception-reasoning-action loop against a code diff.
What it assumes
Draws on experienced engineers’ design intuitions while introducing vocabulary for agent architectures and their recurring engineering pressures.
What you can do after
Evaluate and design an initial agent architecture against task constraints, cost, latency, failure modes, and trust boundaries.
How it connects
Connects perception, reasoning, action, memory, reflection, collaboration, and governance with execution topology.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Agents. The section links point to the parts of the book it draws on.