← Table of Contents · Page 484 of 868

TYPES OF AGENT MEMORY

Part 5 of 10

CROSS-SESSION CONTINUITY Cross-session continuity means that an agent can remember and use information from earlier, separate runs when a new run begins, so that the user does not have to start over each time. A session is one continuous interaction, such as one chat or one run. Without continuity, every session is like meeting someone with total amnesia, requiring you to re-explain everything each time. With continuity, the agent picks up where you left off. To do this, the harness must do several things. It must save the right things at the end of or during a session, such as key decisions, preferences, and the state of ongoing work. It must identify the user or project, so the right memories are found, which requires some identity and access control, as in Chapter 37. It must load relevant memories at the start of the next session, in a compact form that fits the context window. And it must keep memory consistent over time, resolving conflicts when a new fact contradicts an old one. For example, if the saved memory says "the user's deadline is Friday" and a new session reveals the deadline moved to Monday, the system should update or retire the old fact and not hold both. A useful technique is a short summary note written at the end of each session, sometimes called a handoff note to your future self. It states what was done, what remains, and any important decisions. The next session begins by reading that note. It is cheap, human-readable, and often surprisingly effective. Also remember that continuity has a cost in privacy and risk. The longer an agent remembers, the more personal information it accumulates, and the more damage a leak or a poisoned memory could do. A malicious instruction smuggled into a memory could affect every future session, so memory writes deserve the same care you give to tool inputs.
Advertisement
Read Aloud:
0:00 / 0:00