
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 7-lesson course built from CampusX's 1h 06m of YouTube video. 1 day at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by CampusX on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Understand what long-term memory is, why it enables personalization across chat threads, and how LangGraph implements it via the BaseStore abstract class and its InMemoryStore and PostgresStore implementations.
Learn to instantiate an InMemoryStore, create hierarchical namespaces (tuple-based folders), and store key-value memories using the put method for different users and preference categories.
Construct a LangGraph chatbot node that pulls all memories for the current user from the store, injects them into the system prompt, and generates personalized responses using the LLM.
Design a separate extractor LLM with structured output (Pydantic model MemoryDecision) to decide if a user message contains memorizable facts and extract them as a list of strings.
Enhance the extractor prompt to receive existing memories and return a boolean is_new flag for each candidate memory, preventing duplicate entries in the store.
Wire the remember and chat nodes into a single compiled graph that both creates new memories and uses existing ones for personalization, demonstrated with a live invocation.
Replace volatile InMemoryStore with PostgresStore: spin up PostgreSQL via Docker, configure the connection URL, compile the graph with the persistent store, and verify memories survive a kernel restart.