Member-only story
Building LLM Applications
Agentic AI: Building Long-Term Memory
The problem and current solutions
If you’ve ever worked with LLMs, you know they are stateless. If you haven’t, think of them as having no short-term memory.
An example of this is the movie Memento, where the protagonist constantly needs to be reminded of what has happened, using post-it notes with facts to piece together what he should do next.
To converse with LLMs, we need to constantly remind them of the conversation each time we interact.
Implementing what we call “short-term memory” or state is easy. We just grab a few previous question-answer pairs and include them in each call.
Long-term memory, on the other hand, is an entirely different beast.
To make sure the LLM can pull up the right facts, understand previous conversations, and connect information, we need to build some fairly complex systems.
This article will walk through the problem rather than push a lot of jargon, explore what’s needed to build an efficient system, go through the different architectural…









