Skip to Content
View all events

AI Agent Memory Essentials

Published by Pearson

Build Agents That Actually Remember with Hands-On Memory Patterns

  • Most AI agents forget everything the moment a session ends — this course fixes that with three hands-on memory patterns you build and run in class.
  • No paid infrastructure required — all demos run locally using open source tools: ChromaDB, Mem0, and Zep.
  • You leave with working Python code, not just slides — a persistent agent that actually remembers users across sessions.

Most AI agents have a serious problem: they forget. Every new conversation starts from scratch, no matter how many times a user has interacted with the system before. This course tackles that problem head-on. In three focused hours, you will implement the memory layer that separates toy agents from production-ready ones.

The session covers three core memory patterns — vector memory with ChromaDB, conversation memory (buffer, summary, and sliding window), and managed memory with Mem0 and Zep. Each pattern is built live, explained in plain terms, and connected to real production use cases. By the end, you will have a working agent that persists in user context across sessions and knows how to retrieve the right memories at the right time.

What you’ll learn and how you can apply it

  • Implement vector memory using ChromaDB to store, retrieve, and inject memories into an agent's prompt pipeline
  • Apply conversation memory patterns — buffer, summary, and sliding window — and choose the right one for your use case
  • Integrate managed memory layers using Mem0 and Zep to give agents persistent, user-scoped memory across sessions
  • Identify and handle memory failure modes including staleness, poisoning, and retrieval cost issues in production

This live event is for you because...

  • You are a software engineer or ML practitioner building AI agents or chatbots and your users keep having to repeat themselves every session
  • You understand the basics of calling an LLM API but have not yet added a memory layer to your agents and want a practical, code-first path to get there
  • You are evaluating memory backends like ChromaDB, Mem0, or Zep for a production system and want to see them compared side by side in a real build

Prerequisites

  • Basic Python — you should be comfortable reading and writing Python functions and using pip to install packages
  • Some prior experience calling an LLM API (OpenAI, Anthropic, or similar) — you do not need to be an expert but should have made at least one API call before
  • No GPU, no paid cloud account, and no prior knowledge of vector databases required — everything runs locally

Course Set-up

  • Install Python 3.10 or higher
  • Install the required packages: pip install langchain chromadb mem0ai openai
  • Download the course starter notebooks from GitHub: github.com/ashsharda/agent-memory-essentials (link to be confirmed prior to class)
  • Have an OpenAI API key ready — a free-tier key is sufficient for all demos

Recommended Preparation

Recommended Follow-Up

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Segment 1: Why Agents Forget — The Memory Problem (30 minutes)

  • The stateless problem: why LLMs forget between sessions
  • Context windows vs persistent memory — what the difference means in practice
  • Overview of memory types: in-context, external, semantic, episodic, procedural
  • When to add memory and when it is overkill

Q&A (5 minutes)

Segment 2: Vector Memory with ChromaDB (50 minutes)

  • What a vector database is and why it is the right tool for semantic memory
  • Setting up ChromaDB locally — collections, embeddings, and metadata
  • Storing and retrieving memories: embed, persist, query
  • Injecting retrieved memories into the agent prompt pipeline
  • Exercise: Build a memory store that saves user preferences and retrieves them on demand
  • Q&A (5 minutes)
  • Break (10 minutes)

Segment 3: Conversation Memory Patterns (40 minutes)

  • Buffer memory: simplest pattern, best for short conversations
  • Summary memory: LLM compresses history to save tokens — how and when to use it
  • Sliding window memory: keep only the N most recent exchanges
  • Choosing the right pattern for your latency, cost, and accuracy constraints
  • Exercise: Swap memory patterns on the same agent and observe behavior differences

Q&A (5 minutes)

Segment 4: Managed Memory with Mem0 and Zep (40 minutes)

  • What managed memory layers give you that raw ChromaDB does not
  • Mem0: user-scoped persistent memory, automatic extraction and retrieval
  • Zep: conversation history, fact extraction, and temporal memory
  • Drop-in integration patterns — adding Mem0 or Zep to an existing LangChain agent
  • Exercise: Add Mem0 to an existing agent so it remembers the user's name and preferences across sessions

Q&A (5 minutes)

Break (10 minutes)

Segment 5: Memory Pitfalls and Production Considerations (20 minutes)

  • Memory poisoning: what it is and how to guard against it
  • Staleness: when memories go out of date and how to expire them
  • Privacy and compliance: what you should and should not persisRetrieval cost: latency, token cost, and when to cache

Course wrap-up and next steps (5 minutes)

  • Recap of the three memory patterns covered
  • Recommended next topics: multi-agent memory sharing, RAG pipelines, observability for agents
  • GitHub repo with all notebooks and code will remain available after class

Your Instructor

  • Ashish Sharda

    Ashish Sharda is a senior technical engineering leader with over 15 years of experience architecting scalable systems and leading high-impact engineering teams at top companies including Apple, Salesforce, Visa, Yahoo, and LendingTree. His background includes modernizing legacy platforms, implementing microservices and cloud-native architectures, and driving performance optimization across distributed systems. Ashish specializes in backend systems, DevOps, AI/ML integration, and test automation and has led engineering transformations in fintech, real estate, and robotics. He holds multiple advanced degrees in computer science, engineering management, and finance, and is the author of Java Mastery: A Comprehensive Guide to Interview Success.

Skill covered

Machine Learning