Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Anatomy of Memory in Humans & AI Agents

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

The Anatomy of Memory in Humans & AI Agents

Presented at AI Lowlands 2025 & Devnexus 2026

Avatar for Raphael De Lio

Raphael De Lio

December 02, 2025

More Decks by Raphael De Lio

Other Decks in Programming

Transcript

  1. ⓒ 2026 Redis Ltd. All rights reserved. 1 The anatomy

    of memory in humans & AI agents Raphael De Lio & Samuel Agbede
  2. ⓒ 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
  3. ⓒ 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)
  4. ⓒ 2026 Redis Ltd. All rights reserved. 4 Challenge Out

    of the box, LLMs don’t remember you across interactions
  5. ⓒ 2026 Redis Ltd. All rights reserved. 5 Challenge LLMs

    have finite context and they are stateless
  6. ⓒ 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
  7. ⓒ 2026 Redis Ltd. All rights reserved. 7 But what

    is memory, really? And how can you use this in your apps today
  8. ⓒ 2026 Redis Ltd. All rights reserved. 8 “Look deep

    into nature, and then you will understand everything better.” — Albert Einstein
  9. ⓒ 2026 Redis Ltd. All rights reserved. 10 Memory in

    Large Language Models Parameter Space Activation Space
  10. ⓒ 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%
  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%
  12. ⓒ 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%
  13. ⓒ 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.
  14. ⓒ 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.
  15. ⓒ 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%
  16. ⓒ 2026 Redis Ltd. All rights reserved. 19 Activation Space

    That's one small Input 1 2 3 4 5 6 7 n LLM
  17. ⓒ 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
  18. ⓒ 2026 Redis Ltd. All rights reserved. 21 Activation Space

    That's one small Input 1 2 3 step 4 5 6 7 n LLM
  19. ⓒ 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
  20. ⓒ 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
  21. ⓒ 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
  22. ⓒ 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
  23. ⓒ 2026 Redis Ltd. All rights reserved. 27 Memory in

    Large Language Models Parameter Space Activation Space Fixed latent memory Dynamic limited context
  24. ⓒ 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)
  25. ⓒ 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
  26. ⓒ 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
  27. ⓒ 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
  28. ⓒ 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
  29. ⓒ 2026 Redis Ltd. All rights reserved. 36 Non Declarative

    Procedural Priming Non Associative Learning Classical Conditioning
  30. ⓒ 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
  31. ⓒ 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
  32. ⓒ 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...
  33. ⓒ 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
  34. ⓒ 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
  35. ⓒ 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
  36. ⓒ 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
  37. ⓒ 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
  38. ⓒ 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
  39. ⓒ 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
  40. ⓒ 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
  41. ⓒ 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
  42. ⓒ 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
  43. ⓒ 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."
  44. ⓒ 2026 Redis Ltd. All rights reserved. 55 Recurring Challenges

    Memory Acquisition Memory Management Memory Retrieval
  45. ⓒ 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
  46. ⓒ 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
  47. ⓒ 2026 Redis Ltd. All rights reserved. 59 Discrete Strategy

    Extract individual facts and preferences (default)
  48. ⓒ 2026 Redis Ltd. All rights reserved. 61 Preferences Strategy

    Focus on user preferences and characteristics
  49. ⓒ 2026 Redis Ltd. All rights reserved. 62 Custom Strategy

    Use domain-specific extraction prompts
  50. ⓒ 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
  51. ⓒ 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
  52. ⓒ 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
  53. ⓒ 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.
  54. ⓒ 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)