← Table of Contents · Page 231 of 868

MEMORY HIERARCHIES FOR CONTEXT

Part 5 of 11

HOW THE HARNESS MOVES INFORMATION BETWEEN TIERS The tiers are only useful if information moves among them intelligently. Let us describe the movements. Moving down, from hot to warm: this happens at compaction, as you learned in Chapter 21. When the window passes its threshold, older messages are summarized, the summary is stored in the warm tier, and the old messages are removed from the window. At the same time, the harness should copy the original messages to the cold tier, so the details are preserved. Moving down, from warm to cold: summaries that are very old and rarely used can be archived, meaning moved to cheaper, slower storage. This might be triggered by age, such as summaries older than thirty days, or by lack of use. Moving up, from cold to warm or hot: this happens on demand. When the agent or the user asks about something that is no longer in the window, the harness searches the warm tier first, because it is quick and small. If the warm summary does not contain enough detail, the harness goes to the cold tier and retrieves only the specific portion needed, such as one conversation or one tool result, rather than loading everything. The retrieved text is placed into the window as a clearly labeled item, used for the question, and then allowed to leave again when no longer needed. This design balances speed and completeness. Fast paths handle the common case. Slow paths exist for the rare case. How does the harness know what to retrieve? There are several methods, often combined. An index or search over summaries finds relevant ones by keywords or by meaning. The agent itself can request retrieval by calling a tool, such as a tool named recall that takes a topic and returns relevant stored items. The harness can also automatically retrieve when it detects that a message refers to earlier work, such as "like we decided last week." The topic of searching stored information by meaning is covered in depth in Part Eleven, on memory, knowledge, and retrieval. For now, remember the principle: the window is a workspace, not an archive.
Advertisement
Read Aloud:
0:00 / 0:00