← Table of Contents · Page 482 of 868

TYPES OF AGENT MEMORY

Part 3 of 10

LONG-TERM MEMORY STORED OUTSIDE THE MODEL Long-term memory is information saved outside the model and outside the context window, in durable storage such as a database, a set of files, or a specialized search store, so that it survives after a run ends and can be loaded into later runs. The key idea is that the harness decides what to save and what to load. At the end of a run, or during it, the harness writes valuable information to storage. At the start of a later run, or when needed, the harness retrieves relevant items and places them into the context. You can think of long-term memory as a filing cabinet, with the context window as the desk. You cannot keep the whole filing cabinet on your desk, so you pull out the few folders you need right now. This is why loading must be selective. If you load every stored memory into every run, you recreate the clutter problem from Chapter 19. Good long-term memory systems retrieve only the memories relevant to the current task, using techniques that you will study in Chapter 47. What kind of things belong in long-term memory? User preferences, such as "always format reports as bullet points." Facts about the user or project, such as the brand color or the tools the team uses. Decisions that were made and the reasons for them. Lessons learned from past mistakes, such as "this server rejects requests larger than ten megabytes." What does not belong? Temporary details that only matter for the current task. Sensitive data you do not have a good reason or permission to keep. Anything that you have not verified and that might be wrong, because a wrong memory, once stored, can quietly mislead the agent for a long time.
Advertisement
Read Aloud:
0:00 / 0:00