10 Exploring the cognitive agent that thinks, monitors, and adapts
This chapter covers
- Understanding agent cognition and metacognition as engineering concepts
- Mapping the mind into a cognitive agent architecture
- Building a cognitive agent architecture
- Implementing metacognitive processes
At this point, we’ve now built agents that can reason (CoT, ReAct, ToT), reflect on their mistakes (Reflexion), iterate toward goals (the agentic loop), and remember past interactions. Since each of those capabilities is powerful on its own, you might think that stacking reasoning patterns on top of each other will make an agent smarter. But the truth is, stacking them together just makes the agent more complicated. Think of the collection of agents we’ve built like a toolbox full of dull instruments, with no craftsman to decide which to pick up and use. This chapter is about building the craftsman.
10.1 Understanding agent cognition and metacognition as engineering concepts
10.1.1 The five failure modes of capable-but-not-cognitive agents
10.1.2 From reasoning primitives to cognitive architecture
10.1.3 Defining cognition for agents
10.1.4 Defining metacognition for agents
10.1.5 Three theoretical foundations
10.2 Mapping the mind into a cognitive agent architecture
10.2.1 Architecture overview
10.2.2 The Cognitive Workspace
10.2.3 The Perception Module
10.2.4 The Planning Module
10.2.5 The Execution Module
10.2.6 The Evaluation Module
10.2.7 The Attention Module
10.2.8 The Memory Module and the MCP memory server
10.3 Building and running the Cognitive Agent
10.3.1 The cognitive loop
10.3.2 A complete cognitive agent with MCP
10.3.3 Walkthrough: watching the cognitive cycle in action
10.3.4 Confidence-gated execution
10.3.5 Stagnation detection and strategy pivoting
10.3.6 Knowledge boundary awareness
10.3.7 Emergent behaviors
10.4 Measuring cognitive capability and looking ahead
10.4.1 Cognitive efficiency metrics
10.4.2 Before and after: measuring the impact
10.4.3 The road to more general agents
10.5 Exercises
10.6 Summary