Week 4 · Lesson 4 of 10

Manage the Complete Memory Lifecycle

0% Complete

Overview

An agent memory system needs explicit operations for creating, using, updating, and deleting memory. Four operations define this lifecycle: remember, recall, improve, and forget.

Remember adds information to memory. The input may be a document, message, event, decision, or other piece of text. During ingestion, the system can extract entities and relationships and place them into the graph-vector representation. Remember is therefore not limited to storing a verbatim note. It can convert the note into structured knowledge that can later be connected to other information.

Recall queries the stored memory. A recall operation can use semantic similarity, graph relationships, or a combination of both to find the information needed by an agent. The recalled context is then supplied to the model so that the response is grounded in stored knowledge rather than generated from the current prompt alone.

Improve enriches existing memory. It can add new facts, refine relationships, incorporate feedback, or bridge information from temporary session memory into a permanent graph. This operation is critical for agents that become more useful across repeated interactions. A session may produce a useful conclusion, but that conclusion has no long-term value unless it is promoted into a memory store that survives the session.

Forget removes memory at a selected item or scope. Deletion is a necessary part of memory management because not every stored item should remain indefinitely. A scoped forget operation allows the system to remove a particular memory or a defined group of memories rather than discarding the entire knowledge base.

The distinction between session memory and permanent memory is fundamental. Session memory stores information needed during a specific interaction or agent run. It may contain current reasoning context, intermediate findings, or temporary working state. Permanent memory stores information that should be available in future runs, such as confirmed facts, durable decisions, learned retrieval guidance, or a history of important events.

A system can isolate memory by agent and by session. One agent can maintain its own working memory without exposing it to every other agent. At the same time, selected information can be written into a persistent graph so that it is available when the agent starts again. This prevents the agent from returning to a blank state after a restart.

Promotion from session memory to permanent memory must be deliberate. Information that remains only in a temporary session will not help a later run. Information selected for long-term use must be written into the permanent graph or another durable memory scope.

A useful memory policy separates three categories:

  • Temporary context that exists only for the current run.
  • Candidate knowledge produced by an agent and awaiting acceptance.
  • Permanent memory that should influence future runs.

This separation matters because agent-generated updates are not always correct. The examples explicitly noted that agents sometimes provide correct feedback and sometimes do not. Memory improvement should therefore be treated as a controlled update process, not an assumption that every agent statement deserves permanent status.

The full lifecycle is complete only when the system can remember new information, recall relevant context, improve what is stored, forget what should be removed, and persist the selected memory across sessions.

Back to top