Agentic AI · Intermediate level

Intermediate level · Module 7 of 9 · 11 guided hours

Short-Term and Long-Term Memory

Managing what agents remember: conversation buffers and summarisation within token limits, long-term memory stores with search, what to remember and forget, and privacy controls.

Learning objectives

  • Manage short-term memory within context limits
  • Build a searchable long-term memory store
  • Apply privacy and retention rules to memory

Topics

  • conversation buffers
  • token counting and trimming
  • summarising history
  • long-term memory stores
  • retrieving memories
  • privacy, consent and retention

Lessons

  1. Lesson 1 Short-Term Memory and Context Limits

    Learners keep conversations within the context window by trimming and summarising history while preserving the instructions and key facts.

    message buffertoken estimatesliding windowrunning summarypinned instructions and facts

  2. Lesson 2 Long-Term Memory Stores

    Learners store useful facts across sessions (preferences, previous findings) in SQLite, retrieve relevant memories by keyword or embedding search, and give users control over them.

    memory recordmetadata (user, date, source)retrieval by relevancememory expiryuser control

  3. Lesson 3 Memory Privacy, Accuracy and Forgetting

    Learners design rules for what memory must never hold, how long it is kept, how wrong memories are corrected and how memory could be abused.

    sensitive dataretention periodmemory poisoningcorrection and deletionseparation between users

Practical activity

Implement the project's short-term memory management and long-term memory store, with a memory policy, user controls and a poisoning test.

Expected outcomes

  • Effective, controlled agent memory
  • Privacy-aware memory design

Assessment

Memory implementation and tests (70%) and memory policy (30%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.