liveBook · Manning

Cognitive function

As explained in Designing AI Agents

A recurring responsibility in an agent architecture, such as perception, memory, reasoning, or action.

A cognitive function is a recurring responsibility in an agent architecture: perception, memory, reasoning, action, reflection, collaboration, or governance. Each function identifies what the agent needs to do; patterns provide alternative designs for doing it. section 1.1 section 1.4

These functions are a design scaffold, not a claim that an agent deserves human-like trust. The model chooses actions at runtime, while the harness supplies context, permissions, budgets, and stopping conditions. Named capabilities still operate within explicit authority boundaries. section 1.1 section 1.4.1

A function describes purpose; an execution topology describes how work flows. For example, reasoning can run as a chain, route work by complexity, or explore paths in parallel. Conversely, a loop can support reflection, hypothesis testing, or adversarial collaboration. The function and topology together clarify the structure, evidence ownership, and likely failure modes. section 2.3.2 section 2.3

Table 2.7 Same cognitive function, different topologies
Cognitive Function
Topology A
Topology B
Topology C
Reasoning
Chain (Chain-of-Thought)
Route (Complexity-Based Routing)
Parallel (Parallel Exploration)
Reflection
Loop (Self-Heal Loop)
Route (Skill Package)
Hierarchy (Experience Replay)
Memory
Chain (RAG Pipeline)
Hierarchy (Hierarchical Retention)
Loop (Failure Journals)

Compare different execution topologies within reasoning, reflection, and memory. section 2.3.2

A pull-request review

A code-review agent can route a simple rename to a quick check and a caching-layer change to deeper analysis. Specialist agents can review different concerns and aggregate their findings. Before posting, governance checks permission scope and whether evidence supports autonomous posting or human approval; an observability harness records the review trace. section 1.4.1

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

Follow information through the review functions and see governance controls reach across the pipeline. section 1.4.1

The functions can be adopted incrementally. A team might start with perception and action, add memory when context limits become painful, and introduce governance as the agent earns more autonomy. Compare candidate patterns on a fixed workload: more context can increase token use and latency, wider permissions increase risk, and verification costs resources even when it prevents errors. section 1.4.1 section 1.4.2

How Designing AI Agents covers it

How deep it goes
Defines the seven-function scaffold and compares function–topology combinations, while deferring alternative pattern comparisons to later treatments.
Examples
Uses a pull-request review to illustrate complexity-based routing, specialist collaboration, approval checks, and trace logging.
What it assumes
Assumes experience calling a language-model API and trying a simple tool-calling or agent workflow, but not production-agent experience.
What you can do after
Evaluate and understand agent architectures by comparing function–topology choices against cost, latency, failure modes, and trust boundaries.
How it connects
Connects cognitive functions to design patterns, execution topologies, and the agent harness.

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.