we? Raphael De Lio • Developer Advocate @ Redis • 8 years as Java & Kotlin Engineer • 1 year as AI Engineer • Former Dutch Kotlin User Group Leader Samuel Agbede • Developer Advocate @ Redis • 3 years as AI Engineer • Background: Applied AI (unsupervised learning and LLM engineering)
in this space • Every major AI assistant now supports cross-session memory • All 3 hyperscalers ship managed memory services • Open-source memory frameworks growing fast — Mem0, Letta, Zep, Cognee, Graphiti, LangMem
That's one small step for man, _ one age best most end very blur 53% 45% 36% 27% 12% 11% 11% • Parameters do not store exact documents or explicit memories. • Parameters encode statistical patterns of large text datasets. • Parameters are fixed once they have been tuned. • Parameters can be changed only with retraining or fine tuning.
competitive Scrabble player ever • Nigel Richards won multiple world championships in English Scrabble • Learned French word lists without speaking French • Won the French World Scrabble Championship.
• Every information needs to be present in the context window • The context window is limited in length • Scaling the length of the context window is challenging • Workarounds to scale the context window leads to imprecise responses
gave us better input, it would offer real constraints and guardrails for future models." "I’m hopeful that artificial intelligence will uncover arithmetics or algorithms humans use in problem-solving that we have overlooked." "John McCarthy, the founder of AI, was a close colleague at Stanford, and our research groups shared the PDP-1, the first transistorized computer on the West Coast.” Richard Atkinson (https://www.youtube.com/watch?v=WxWmkpWOe7M)
Episodic Semantic memory is your memory for facts, meanings, and general knowledge. • knowing that Paris is the capital of France • knowing the meaning of the word “photosynthesis” • knowing that a bicycle has two wheels • knowing how categories relate (dog → animal) Episodic memory is your memory for personal events and experiences. Episodic memories include: • time (when it happened) • place (where it happened) • feelings and details • the context of your experience
Episodic Semantic memory is your memory for facts, meanings, and general knowledge. • knowing that Paris is the capital of France • knowing the meaning of the word “photosynthesis” • knowing that a bicycle has two wheels • knowing how categories relate (dog → animal) Episodic memory is your memory for personal events and experiences. Episodic memories include: • time (when it happened) • place (where it happened) • feelings and details • the context of your experience
Procedural Procedural memory allows you to perform skills and actions automatically, without needing to think about how to do them. Among them are included cognitive and motor skills. Motor skills: • Riding a bicycle • Typing on a keyboard • Playing a musical instrument Cognitive skills: • Reading smoothly • Chess patterns • Language Patterns Habits & Routines: • Tying shoelaces • Taking a shower • Navigating a specific route
Procedural Procedural memory allows you to perform skills and actions automatically, without needing to think about how to do them. Among them are included cognitive and motor skills. Motor skills: • Riding a bicycle • Typing on a keyboard • Playing a musical instrument Cognitive skills: • Reading smoothly • Chess patterns • Language Patterns Habits & Routines: • Tying shoelaces • Taking a shower • Navigating a specific route
Priming Priming is a type of memory in which a previous experience makes you process the same or related information more quickly and easily, even if you do not consciously remember the earlier experience. • Word priming • Picture priming • Semantic priming • Repetition priming • Everyday object example Marketeers take full advantage of priming: • Showing the brand repeatedly • Pairing the brand with a feeling • Associating the brand with contexts • Associating the brand with words • Associating the brand with smell, audio, images...
Classical (Pavlovian) Conditioning Emotional Skeletal Emotional responses are automatic feelings that happen because a neutral stimulus became linked with an emotional event. • A person hears a dog bark and then gets bitten. Later any dog bark produces a fear reaction. • A person eats a snack while watching a specific TV show. Next time they watch the same show, they get hungry. • A person that gets sick after eating a certain food may get nauseated by the smell of the same food later Skeletal responses are automatic body movements or reflex-like actions that happen because a neutral stimulus became linked with a physical event. • Startle response to phone vibration • Blinking when someone raises their hand quickly
Non associative Learning Habituation Sensitization Habituation is a form of non-associative memory in which the brain learns to respond less to a repeated, harmless stimulus. • You stop noticing the sound of a fan in your room. • You get used to cold pool water • My dog stops responding to its name Sensitization is a form of non-associative memory in which the brain learns to respond more strongly to a repeated or intense stimulus. • After watching a horror movie, every small sound in your house scares you
The central executive is responsible for the control and regulation of cognitive processes. It directs focus and targets information, making working memory and long-term memory work together. It can be thought of as a supervisory system that controls cognitive processes, making sure the short-term store is actively working, and intervenes when they go astray and prevents distractions Among its functions: • Updating and coding incoming information and replacing old information • Binding information from a number of sources into coherent episodes • Coordination of other systems • Shifting between tasks or retrieval strategies • Inhibition, suppressing dominant or automatic responses • Selective attention
The phonological loop deals with sound or phonological information. It consists of two parts: • a short-term phonological store with auditory memory traces that are subject to rapid decay • an articulatory loop component that can revive the memory traces • Acoustic Store -> keeps sounds briefly • Articulatory Loop -> your "inner voice" repeating them Among its functions: • Mentally repeating a phone number • Silently reading a sentence by hearing the words in our "inner voice" • Following speech • Remembering spoken instructions
The visuospatial sketchpad deals with visual and spatial information. It consists of two parts: • a visual cache that temporarily stores visual details such as shape, color, and form • an inner scribe that processes spatial layout, movement, and the arrangement of objects in space. Together, they allow the brain to hold and manipulate mental images for short periods of time. Among its functions: • Mentally visualizing an object • Remembering where things are • Navigating a space in your mind • Reading maps • Mental Rotation • Tracking Movement • Imagining Patterns and Designs
Both depend on pattern recognition to process information. • Both use context to guide interpretation and recall. • Both show position based effects similar to primacy and recency. 2307.03172 Arxiv: Lost in the Middle: How Language Models Use Long Contexts
LLMs Long-term update Continuous biological learning Updated only via training or fine tuning Recall mechanism Cue + context + emotion dependent Pattern completion via probability Forgetting (long term) Adaptive decay and interference No decay unless weights changed Short-term forgetting Cognitive limitation Context window truncation Intentional retrieval Can deliberately search memory No internal goal or search process
Memory Server Model (Brookins, 2025) Agent Memory Server Working Memory Redis Long-term Memory Namespace Session ID User ID Messages Time-to-live Context Long-term Memory Strategy Topics Entities User ID Session ID Text Embedding Type Access Count
Advisors Advisors are interceptors that handle requests and responses in our AI applications. We can use them to perform actions before and/or after the request is sent like enriching the request with more information or even cancelling the request to the chat model entirely. before(1) after(1) Advisor 1 before(N) after(N) Advisor N Chat Model Prompt Advised Prompt Advised Prompt Advised Response Advised Response Response
Advisors Before Inject Session Messages After Append New Messages in Session ChatMemoryRepository Before Retrieve Long Term Memories After Does Nothing LongtermMemoryRepository Chat Model Prompt Allowed No Cache Hit Response
LLM memory is limited Human memory offers insights Based on their architecture, LLMs are stateless and have limited context windows. This limits how much they can remember Studying the human memory model gives insights into how we might overcome the challenges and limitations of LLM memory Key takeaways Agent Memory Server Open-source library which allows you implement short-term/long-term memory in your agents.
was working on mathematical models of pavlovian conditioning, and what amazed me was that these were probabilistic, stochastic models." "I had been used to deterministic models, and in the 1940s there were very few probabilistic ones." "I ended up doing my PhD with Estes and spent the next ten years on stimulus-sampling theory.” Richard Atkinson (https://www.youtube.com/watch?v=WxWmkpWOe7M)