liveBook · Manning

Memory module

As explained in AI Agents in Action, Second Edition

A memory module is a cognitive component that retrieves relevant prior experiences or information for use in subsequent processing.

A memory module gives a cognitive agent persistent long-term memory. It retrieves relevant prior experience before planning, records outcomes after evaluation, and turns separate tasks into cumulative institutional knowledge. section 10.2.8 section 10.2.1

Treat the module as an active layer over a structured knowledge graph:

  • Proactive retrieval searches for entities related to the current task and injects matching observations into the workspace before planning. section 10.2.8
  • Experience recording stores the completed task, strategy, and evaluation outcome, adding observations to an existing problem type or creating a new entity. section 10.2.8
  • Relation building connects related problem types, successful tool combinations, and known failure modes when strategies succeed across different tasks. section 10.2.8
  • The underlying graph uses entities as primary nodes, relations as directed connections, and observations as discrete information attached to entities. section 10.2.8

Retrieving experience during diagnosis

For an intermittent deployment failure occurring only under high traffic, memory retrieval can find a prior connection-pool exhaustion entity with an observation about failures under load and increasing max_connections. Planning then tests connection exhaustion, health-check races, and resource contention instead of repeating a generic timeout fix. section 10.3.3

How AI Agents in Action, Second Edition covers it

How deep it goes
Explains graph primitives, retrieval timing, recording behavior, and relation building, but defers detailed implementation beyond the agent listing.
Examples
Uses a high-traffic deployment failure, connection-pool exhaustion, strategy observations, and a layered memory architecture.
What it assumes
Assumes familiarity with cognitive-agent modules and shared workspaces while defining the memory graph’s entities, relations, and observations.
What you can do after
Build it from scratch by configuring the MCP memory server and assigning retrieval, recording, and relation-building responsibilities to an agent.
How it connects
Links the cognitive workspace with planning, evaluation, attention, MCP servers, and knowledge graphs.

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.