Share
Embed
The Anatomy of Memory in Humans & AI Agents
Presented at AI Lowlands 2025 & Devnexus 2026
Raphael De Lio
December 02, 2025
Transcript
86 slides
-
ⓒ 2026 Redis Ltd. All rights reserved. 1 The anatomy
of memory in humans & AI agents Raphael De Lio & Samuel Agbede -
ⓒ 2026 Redis Ltd. All rights reserved. 2 Agenda •
Memory in Large Language Models • The anatomy of human memory • How we can easily enhance agentic AI memory • Demo -
ⓒ 2026 Redis Ltd. All rights reserved. 3 Who are
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) -
ⓒ 2026 Redis Ltd. All rights reserved. 4 Challenge Out
of the box, LLMs don’t remember you across interactions -
ⓒ 2026 Redis Ltd. All rights reserved. 5 Challenge LLMs
have finite context and they are stateless -
ⓒ 2026 Redis Ltd. All rights reserved. 6 Massive movement
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 7 But what
is memory, really? And how can you use this in your apps today -
ⓒ 2026 Redis Ltd. All rights reserved. 8 “Look deep
into nature, and then you will understand everything better.” — Albert Einstein -
ⓒ 2026 Redis Ltd. All rights reserved. 9 Memory in
Large Language Models -
ⓒ 2026 Redis Ltd. All rights reserved. 10 Memory in
Large Language Models Parameter Space Activation Space -
ⓒ 2026 Redis Ltd. All rights reserved. 12 Parameter Space
That's one small step for man, _ one good best most end very blur 53% 45% 36% 27% 12% 11% 11% -
ⓒ 2026 Redis Ltd. All rights reserved. 13 Parameter Space
This boy made a mistake, if he were a man, _ one he best little wife very blur 73% 42% 33% 23% 17% 12% 11% -
ⓒ 2026 Redis Ltd. All rights reserved. 14 Parameter Space
This boy made a mistake, if he were a man, _ one he best little wife very blur 42% 73% 33% 23% 17% 12% 11% -
ⓒ 2026 Redis Ltd. All rights reserved. 16 Parameter Space
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. -
ⓒ 2026 Redis Ltd. All rights reserved. 17 The greatest
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. -
ⓒ 2026 Redis Ltd. All rights reserved. 18 Activation Space
That's one small step for man, _ one he best little wife very blur 73% 42% 33% 23% 17% 12% 11% -
ⓒ 2026 Redis Ltd. All rights reserved. 19 Activation Space
That's one small Input 1 2 3 4 5 6 7 n LLM -
ⓒ 2026 Redis Ltd. All rights reserved. 20 Activation Space
That's one small Input 1 2 3 4 5 6 7 n LLM step 4 -
ⓒ 2026 Redis Ltd. All rights reserved. 21 Activation Space
That's one small Input 1 2 3 step 4 5 6 7 n LLM -
ⓒ 2026 Redis Ltd. All rights reserved. 22 Activation Space
That's one small Input 1 2 3 step 4 5 6 7 n LLM for -
ⓒ 2026 Redis Ltd. All rights reserved. 23 Activation Space
That's one small Input 1 2 3 step 4 for 5 6 7 n LLM -
ⓒ 2026 Redis Ltd. All rights reserved. 24 Activation Space
That's one small Input 1 2 3 step 4 for 5 6 7 n LLM man -
ⓒ 2026 Redis Ltd. All rights reserved. 25 Activation Space
Attention Mechanism Quadratic time -
ⓒ 2026 Redis Ltd. All rights reserved. 26 Activation Space
• 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 -
ⓒ 2026 Redis Ltd. All rights reserved. 27 Memory in
Large Language Models Parameter Space Activation Space Fixed latent memory Dynamic limited context -
ⓒ 2026 Redis Ltd. All rights reserved. 28 The man
who could not remember -
ⓒ 2026 Redis Ltd. All rights reserved. 29 The Anatomy
of Human Memory -
ⓒ 2026 Redis Ltd. All rights reserved. 30 "If neuroscientists
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) -
ⓒ 2026 Redis Ltd. All rights reserved. 31 Multi-store memory
model (Atkinson & Shiffrin, 1968) Sensory Store Short-term Store Long-term Store Attention Retrieval Transfer Lost Information -
ⓒ 2026 Redis Ltd. All rights reserved. 33 Long-term Memory
(Larry Squire, 1992) Declarative Semantic Episodic Medial Temporal Lobe Diencephalon Non Declarative Procedural Priming Classical Conditioning Non Associative Learning Emotional Responses Skeletal Responses Habituation Sensitization Striatum Neocortex Amygdala Cerebellum Reflex Pathways -
ⓒ 2026 Redis Ltd. All rights reserved. 34 Declarative Semantic
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 35 Declarative Semantic
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 36 Non Declarative
Procedural Priming Non Associative Learning Classical Conditioning -
ⓒ 2026 Redis Ltd. All rights reserved. 37 Non Declarative
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 38 Non Declarative
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 39 Non Declarative
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... -
ⓒ 2026 Redis Ltd. All rights reserved. 41 Non Declarative
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 42 Non Declarative
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 43 Long-term Memory
(Larry Squire, 1992) Declarative Semantic Episodic Medial Temporal Lobe Diencephalon Non Declarative Procedural Priming Classical Conditioning Non Associative Learning Emotional Responses Skeletal Responses Habituation Sensitization Striatum Neocortex Amygdala Cerebellum Reflex Pathways -
ⓒ 2026 Redis Ltd. All rights reserved. 45 Working Memory
(Short-term [Baddeley & Hitch, 1974]) Central Executive Episodic Buffer Phonological Loop Visuospatial Sketchpad Paerietal Lobe Prefrontal Cortex Broca's Area Wernicke's Area Occipital Lobe Paerietal Lobe Acoustic Store Articulatory Loop Visual Cache Inner Scribe -
ⓒ 2026 Redis Ltd. All rights reserved. 46 Central Executive
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 47 Phonological Loop
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 48 Visuospatial Sketchpad
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 49 Working Memory
(Short-term [Baddeley & Hitch, 1974]) Central Executive Episodic Buffer Phonological Loop Visuospatial Sketchpad Paerietal Lobe Prefrontal Cortex Broca's Area Wernicke's Area Occipital Lobe Paerietal Lobe Acoustic Store Articulatory Loop Visual Cache Inner Scribe -
ⓒ 2026 Redis Ltd. All rights reserved. 51 Similarities •
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 52 Differences Humans
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 53 "It's not
because an airplane doesn't fly like a bird that it means it doesn't fly." -
ⓒ 2026 Redis Ltd. All rights reserved. 55 Recurring Challenges
Memory Acquisition Memory Management Memory Retrieval -
ⓒ 2026 Redis Ltd. All rights reserved. 56 Redis Agent
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 58 Memory Extraction
Strategies • Discrete Strategy: Extract individual facts and preferences (default) • Summary Strategy: Create conversation summaries • Preferences Strategy: Focus on user preferences and characteristics • Custom Strategy: Use domain-specific extraction prompts -
ⓒ 2026 Redis Ltd. All rights reserved. 59 Discrete Strategy
Extract individual facts and preferences (default) -
ⓒ 2026 Redis Ltd. All rights reserved. 60 Summary Strategy
Create conversation summaries -
ⓒ 2026 Redis Ltd. All rights reserved. 61 Preferences Strategy
Focus on user preferences and characteristics -
ⓒ 2026 Redis Ltd. All rights reserved. 62 Custom Strategy
Use domain-specific extraction prompts -
ⓒ 2026 Redis Ltd. All rights reserved. 63 Memory Forgetting
& Decay Strategies • Recency scoring: [ranking] ◦ Soft decay: freshness & novelty • Forgetting: [hard delete] ◦ age based ◦ Inactivity ◦ budget -
ⓒ 2026 Redis Ltd. All rights reserved. 68 Integrating with
Java & Spring AI -
ⓒ 2025 Redis Ltd. All rights reserved. 69 Spring AI
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 -
ⓒ 2025 Redis Ltd. All rights reserved. 70 Spring AI
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 -
ⓒ 2026 Redis Ltd. All rights reserved. 72 Long Term
Memory Advisor -
ⓒ 2026 Redis Ltd. All rights reserved. 73 Long Term
Memory Advisor -
ⓒ 2026 Redis Ltd. All rights reserved. 74 Long Term
Memory Advisor -
ⓒ 2026 Redis Ltd. All rights reserved. 75 Long Term
Memory Advisor -
ⓒ 2026 Redis Ltd. All rights reserved. 76 Long Term
Memory Advisor -
ⓒ 2026 Redis Ltd. All rights reserved. 77 Integrating with
Java & Spring AI -
ⓒ 2026 Redis Ltd. All rights reserved. 78 Integrating with
Java & Spring AI -
ⓒ 2026 Redis Ltd. All rights reserved. 79 Integrating with
Java & Spring AI -
ⓒ 2026 Redis Ltd. All rights reserved. 80 Integrating with
Java & Spring AI -
ⓒ 2026 Redis Ltd. All rights reserved. 81 Wrap Up
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. -
ⓒ 2026 Redis Ltd. All rights reserved. 82 Different agents
may need different types of memory -
ⓒ 2026 Redis Ltd. All rights reserved. 85 "Bill Estes
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) -
ⓒ 2026 Redis Ltd. All rights reserved. 86 Raphael De
Lio Samuel Agbede