n4nAI

Topic

LangChain Memory & Conversational State

12 posts on langchain memory & conversational state — part of framework tutorials on the n4n AI blog.

Framework tutorialsGuide

Token-efficient conversation summarization in LangChain

Learn practical langchain token efficient summarization patterns for production conversational systems — memory types, custom strategies, and pitfalls to avoid.

5 min read
Framework tutorialsHow-to

Persisting LangChain memory to Postgres

A step-by-step guide to implementing LangChain memory persistence with Postgres, including schema design, custom memory classes, and production-ready patterns.

4 min read
Framework tutorialsGuide

LangChain memory for multi-user chat applications

Build production-ready multi-user chat with LangChain memory — isolation strategies, storage backends, and pitfalls that bite at scale.

5 min read
Framework tutorialsHow-to

Debugging LangChain memory that forgets earlier context

Step-by-step debugging guide for LangChain memory that drops earlier conversation turns, with runnable code to verify fixes.

5 min read
Framework tutorialsHow-to

Migrating LangChain memory to the message history API

Step-by-step guide to migrating deprecated LangChain memory classes to the modern BaseChatMessageHistory API with runnable code and verification steps.

4 min read
Framework tutorialsHow-to

LangChain summary memory with n4n.ai for long chats

Implement LangChain summary memory with n4n.ai to handle long conversations without token overflow, including fallback routing and usage metering.

4 min read
Framework tutorialsHow-to

LangChain memory with Redis for multi-session chatbots

Build production-ready multi-session chatbots using LangChain memory with Redis — complete setup, code patterns, and verification steps.

4 min read
Framework tutorialsTutorial

LangChain ConversationBufferWindowMemory tutorial

A hands-on tutorial for LangChain ConversationBufferWindowMemory with runnable code, expected outputs, and production patterns for managing conversational context windows.

3 min read
Framework tutorialsGuide

Entity memory in LangChain: tracking facts across turns

A practical guide to implementing LangChain entity memory for tracking facts across conversation turns, with code examples and production considerations.

4 min read
Framework tutorialsTutorial

LangChain RunnableWithMessageHistory tutorial

Hands-on langchain runnablewithmessagehistory tutorial: build stateful LCEL conversational chains with custom memory backends and OpenAI-compatible APIs.

3 min read
Framework tutorialsDefinition

LangChain memory types explained: buffer vs summary

A practical definition of LangChain memory types buffer vs summary: how buffer and summary memory work, code samples, and when to use each for engineers building LLM chat systems.

5 min read
Framework tutorialsHow-to

Add conversational memory to a LangChain chatbot

Step-by-step guide to add conversational memory to a LangChain chatbot using buffer and summary memory, with runnable Python code and verification tips.

3 min read