AI has entered a new phase with the rise of agentic applications, systems that go far beyond traditional chatbots. Instead of responding to one-off prompts, these agents can reason, plan, and coordinate multiple tools to complete complex, multi-step tasks.
Think of a trading bot that scans live market data and executes trades, or a self-driving car that interprets sensor inputs to navigate in real time. Other examples include IT support agents that detect and fix problems before users even notice, or HR assistants that screen candidates and streamline onboarding.
As these systems become more persistent and embedded in daily workflows, long-term memory becomes critical. A personal AI assistant that forgets your preferences after each conversation is hardly useful. For real value, agents need to learn from past interactions and apply that knowledge to future tasks.
But adding memory isn’t simple. Developers face challenges such as the limited context windows of large language models, the risk of storing irrelevant or outdated data, and the computational cost of finding the right information at the right time.
To address these hurdles, it helps to think about memory in three categories:
Semantic Memory — Factual knowledge, like birthdays or scheduled meetings for a calendar agent.
Episodic Memory — Records of past experiences that allow agents to improve their behavior over time.
Procedural Memory — The rules and instructions an agent follows to carry out specific tasks.
Table of Contents:
Importance of Memory for Agents
The Three Pillars of Agent Memory
Paradigms for Updating Memory
Building agents with memory capabilities requires the right tools — and that’s where LangChain’s ecosystem comes in. LangChain provides the open-source foundation for LLM-powered applications, while LangGraph gives developers the framework to design stateful, multi-actor systems.
Now, with the addition of the Langmem SDK, there’s a dedicated library to handle the logic of creating, updating, and retrieving different types of long-term memory inside LangGraph.
Langmem is both flexible and modular: you can start with simple in-memory storage or connect to a production-ready database, depending on your needs.
In this series, we’ll explore how to put these ideas into practice by building an email assistant that demonstrates how semantic, episodic, and procedural memory can be effectively managed with LangGraph and Langmem.
Introduction to Agentic Meomery [You are here!]
Baseline Writing Assistant Agent [Coming Soon!]
Writing Assistant Agent with Semantic Meomery [Coming Soon!]
Writing Assistant with Semantic & Episodic Memory [Coming Soon!]
Writing Assistant with Semantic, Episodic & Procedural Memory [Coming Soon!]
Get All My Books, One Button Away With 40% Off
I have created a bundle for my books and roadmaps, so you can buy everything with just one button and for 40% less than the original price. The bundle features 8 eBooks, including:
1. Importance of Memory for Agents
In recent developer surveys, personal assistants and productivity tasks were ranked as one of the top applications for AI agents. A key element that makes these agents effective is long-term memory.
Imagine hiring a human assistant who forgot every conversation and instruction you ever gave them; it would be a frustrating and inefficient experience. The same principle applies to AI agents; without memory, they are severely limited.
In this series, we will explore how to build sophisticated agents that can remember, learn, and adapt. We will use a practical and relatable example: an email assistant agent. We all deal with a flood of emails, and an intelligent agent can be a powerful ally in managing this influx.
To perform its job well, an email agent needs capabilities similar to a human executive assistant. It requires access to tools like a calendar to check availability and the ability to draft and send emails on your behalf. More importantly, it needs to remember crucial information such as:
User Preferences: What are your preferred meeting times, locations, and titles?
Communication Style: What is your typical tone and writing style?
Interaction History: What is the context of previous interactions with specific people?
This email assistant provides the perfect proving ground to introduce and demonstrate three fundamental types of memory for AI agents, drawing inspiration from cognitive science.
2. The Three Pillars of Agent Memory
When designing an agent, it’s helpful to categorize the information it needs to store into three distinct types of memory: Semantic, Episodic, and Procedural.
Keep reading with a 7-day free trial
Subscribe to To Data & Beyond to keep reading this post and get 7 days of free access to the full post archives.