liveBook · Manning

Cognitive cycle

As explained in AI Agents in Action, Second Edition

A recurring agent process that perceives a task, retrieves relevant memory, plans, executes actions, evaluates results, and records new experience.

A cognitive cycle is the agent’s inner process for deciding what to do next: perceive the task, plan, execute, and evaluate. An attention module routes control between these stages using signals from a shared cognitive workspace, while allowing replanning when results indicate trouble. section 10.2.7 section 10.3.1

Unlike a simple multi-agent pipeline, the cycle can break, repeat, or skip steps. Stagnation, contradiction, and low confidence trigger new routing within the same iteration; familiar, low-complexity tasks with relevant memory can take a fast response path. section 10.2.7 section 10.3.1

Use the cycle as a layered control pattern:

  • Let the outer agentic loop decide whether to continue or stop. section 10.3.1
  • Let the inner cognitive cycle decide what processing step comes next. section 10.3.1
  • Use workspace signals to redirect attention, record failed approaches, test competing hypotheses, or escalate uncertainty. section 10.2.7

Intermittent deployment failures

For a pipeline that fails only under high traffic after timeout increases have already failed, perception identifies contradiction and complexity. Memory surfaces connection-pool exhaustion as a related experience; planning selects hypothesis testing; execution investigates connection limits before evaluation decides whether to replan. section 10.3.3

Figure 10.8 The cognitive loop layered on the agentic loop

The layered diagram clarifies how outer iteration, inner cognitive processing, and attention-based signal routing interact. section 10.3.1

How AI Agents in Action, Second Edition covers it

How deep it goes
Explains layered control, signal-triggered repetition, fast-path skipping, and deterministic routing, but not model internals.
Examples
Uses intermittent deployment failures, connection-pool exhaustion, competing hypotheses, and attention-routing code.
What it assumes
Assumes familiarity with agentic loops and introduces cognitive processing as a layer inside them.
What you can do after
Diagnose/debug with it by tracing attention routing and workspace signals when an agent behaves unexpectedly.
How it connects
Connects cognitive architecture with attention modules, cognitive workspaces, memory, evaluation, and agentic loops.

Related concepts

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