Sitemap
Level Up Coding

Coding tutorials and news. The developer homepage gitconnected.com && skilled.dev && levelup.dev

Member-only story

Building LLM Applications

Agentic AI: Building Long-Term Memory

The problem and current solutions

10 min readSep 30, 2025

--

Press enter or click to view image in full size

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.

Press enter or click to view image in full size

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…

--

--

Building stuff (applied AI, general tech)

See more from me