Intermediate1h24m

Long-Term Agentic Memory With LangGraph

Instructor: Harrison Chase

LangChain logo

Earn an accomplishment with PRO · Updated Oct 7, 2025

  • Intermediate
  • 1h24m
  • 7 Video Lessons
  • 5 Code Examples
  • 1 Graded Assignment PRO
  • Earn an accomplishment with PRO
  • Updated Oct 7, 2025
  • Instructor: Harrison Chase
  • LangChainLangChain
  • Learn more aboutMembership PRO Plan

What you'll learn

  • Learn how memory works and how the three types of memory – semantic, episodic, and procedural – are used in agentic workflows.

  • Build a personal email agent with routing, writing, scheduling tools to automatically ignore, respond to, or notify about incoming emails.

  • Add long-term memory to your agent by adding facts, user preferences, and evolving system prompts to a memory store that can be searched for on-going interactions.

Course recap

PRO

This course teaches three types of long-term memory for AI agents -- semantic, episodic, and procedural -- applied to an email assistant agent built with LangGraph. It covers both hot-path memory updates (inline during agent execution) and background memory updates (in separate processes), demonstrating the trade-offs of each approach.

Concept map

Concepts in Long-Term Agentic Memory With LangGraph and the courses that connect to themLong-Term Agentic Memory with LangGraphLong-Term Agentic Memory…Agent MemoryAI AgentsFew shot learningLLMs as Operating Systems - Agent MemoryLLMs as Operating Systems…Multi AI Agent Systems with CrewAIMulti AI Agent Systems wi…LangChain for LLM Application DevelopmentLangChain for LLM Applica…Building AI Assistants with On-Device MemoryBuilding AI Assistants wi…Context EngineeringAI Agents for Image and Video GenerationAI Agents for Image and V…Building AI Browser AgentsConcepts in Long-Term Agentic Memory With LangGraph and the courses that connect to themLong-Term Agentic Memory with LangGraphLong-Term Agent…Agent MemoryAI AgentsFew shot learningFew shot learni…

Key concepts

  • Agent MemoryThree categories: semantic (facts), episodic (experiences/few-shots), and procedural (instructions/system prompts)
  • AI AgentsLangGraph-based agents with tools for email triage, calendar management, and email composition
  • Few shot learningEpisodic memory implemented as dynamically retrieved few-shot examples that guide agent behavior

Lesson highlights

  1. 1.Introduction to Agent Memory — Three memory types (semantic, episodic, procedural) and hot-path vs background update paradigms
  2. 2.Building the Email Agent — Baseline email agent with triage and response sub-agents using LangGraph
  3. 3.Semantic Memory — Adding fact-based memory with read/write tools in the hot path for user preferences and context
  4. 4.Episodic Memory — Few-shot examples for triage decisions, updated in background processes
  5. 5.Procedural Memory — Self-improving system prompts updated by a separate optimization agent
  6. 6.Combining Memory Types — Integrating all three memory types into the complete email agent
  7. 7.Conclusion — Generalizing memory techniques to other agent applications

About this course

Learn to build an agent with long-term memory in Long-Term Agentic Memory with LangGraph! Created in partnership with LangChain, and taught by its Co-Founder and CEO, Harrison Chase.

Imagine you had a human personal assistant who forgot about their previous conversation with you—not ideal. The same goes for Agents.

The main use cases for agents include personal assistance and productivity tasks. One core aspect of these tasks is long-term memory.

In this course, you will learn how to build an agent with long-term memory by creating a personal email agent that can respond, ignore, and notify the user using writing, scheduling, and memory tools. You’ll develop your agent’s memory by adding facts to its memory store, providing examples to learn the user’s preferences, and optimizing system prompts to evolve instructions based on previous responses.

By the end of this course, you will have the foundational mental framework to build an agent with long-term memory using LangGraph.

In detail, you’ll:

  • Learn how the three types of memory–semantic, episodic, and procedural–and the two mechanisms–via hot path and in the background– apply to your agent.
  • Build an email agent with writing, scheduling, and availability tools, along with a router that triages incoming email and handles it accordingly by ignoring, responding, or notifying the user.
  • Add tools to your email agent that allow it to operate on semantic memory by learning facts about the user, storing them in a long-term memory store, and searching over them in future interactions.
  • Incorporate episodic memory in the form of few-shot examples in the triage step of your agents to help them learn and update user preferences.
  • Add procedural memory as system prompts, optimized with feedback to improve the instructions the agent follows.

Start building agents with long-term memory with LangGraph.

Who should join?

It’s helpful to be familiar with Python and a basic understanding of LLM prompting and LLM application development.

Course Outline

7 Lessons・5 Code Examples
Unlock certificates

Elevate your learning experience with Pro

Upgrade to Pro and gain unlimited accomplishments on your resume

Learn More

Instructor

Harrison Chase

Harrison Chase

Course access is free for a limited time during the DeepLearning.AI learning platform beta!

Want to learn more about Generative AI?

Keep learning with updates on curated AI news, courses, and events, as well as Andrew’s thoughts from DeepLearning.AI!