StoryboardAI Engineering

Long-term memory

Facts the app saves between conversations and puts back into the prompt when they are relevant.

What is long-term memory?

Within one conversation, memory is the conversation itself, resent each time. When the conversation ends, that is gone. For an assistant to know you next week, something has to be saved somewhere else.

So the app picks out what is worth keeping, a preference, a size, a decision, and stores it in its own database. At the start of a later conversation it fetches the relevant facts and places them in the prompt. The model has not remembered anything. It has been told.

Memory needs care. Facts go out of date and must be replaced, not piled up. And because it is personal, people should be able to see what is kept and delete it.

Memory is saved between conversations and looked up at the start of the next.Step 1: A conversation ends. Step 2: Facts worth keeping are saved. Step 3: Next time, relevant notes are found. Step 4: They are placed in the prompt. Then it repeats from step 1.1A conversationends2Facts worthkeeping are saved3Next time,relevant notes arefound4They are placed inthe promptand round again
Memory is saved between conversations and looked up at the start of the next.

Why does long-term memory matter?

An assistant that forgets a person between conversations has to be told the same things every time. Remembering preferences and past events is what makes an assistant feel like it knows you. Since the model itself remembers nothing, this has to be built, and built carefully, because a wrong memory is acted on without doubt.

How does long-term memory work?

  1. After a conversation, the model is asked what is worth keeping.
  2. Each fact is saved as a short note with a date and where it came from.
  3. At the start of a new conversation, the notes relevant to it are looked up.
  4. Those notes are placed in the prompt, so the model appears to remember.
  5. A newer note about the same thing replaces the older one, and the person can view and delete any of them.

When should you use long-term memory?

Use it when

  • People return and expect to be known
  • Preferences should carry from one session to the next
  • An agent keeps relearning the same facts about a project

Think twice when

  • Each conversation should start clean
  • You have no way for people to see and correct what is stored

Where does long-term memory sit in a real system?

Memory lives in a store owned by your system, filed per person. The harness reads from it before a conversation and writes to it after. It is separate from the saved conversation itself.

What goes wrong with long-term memory?

  • Saving claims made by strangers as facts.
  • Never expiring or replacing old notes.
  • Loading every memory into every prompt, relevant or not.

What does long-term memory look like in practice?

An assistant saved "Sam works at TentCo" in February. In May an email from Sam says he has gone freelance. The newer note replaces the older, with its source. An email from a stranger claiming a supplier's bank details changed is not saved as a fact at all.

Watch it happen

These stories show long-term memory at work, one step at a time.