# How to Build Durable Chat Memory for RAG Using ScyllaDB and LangChain

DevFeed: [How to Build Durable Chat Memory for RAG Using ScyllaDB and LangChain](<https://devfeed.tech/articles/how-to-build-durable-chat-memory-for-rag-using-scylladb-and-langchain-112510.md>)

Original publisher: [Read original article](<https://hackernoon.com/how-to-build-durable-chat-memory-for-rag-using-scylladb-and-langchain?source=rss>)

Author: ScyllaDB

Published: 2026-11-02T14:15:18Z

Content type: tutorial

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [AI chatbot continuity](<https://devfeed.tech/topics/ai-chatbot-continuity.md>), [LangChain](<https://devfeed.tech/topics/langchain.md>), [scylladb](<https://devfeed.tech/topics/scylladb.md>), [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [Cohere API for embeddings](<https://devfeed.tech/topics/cohere-api-for-embeddings.md>)

Tags: [2026-2](<https://devfeed.tech/tags/2026-2.md>), [abstraction](<https://devfeed.tech/tags/abstraction.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-applications](<https://devfeed.tech/tags/ai-applications.md>), [all](<https://devfeed.tech/tags/all.md>), [build](<https://devfeed.tech/tags/build.md>), [chat](<https://devfeed.tech/tags/chat.md>), [context](<https://devfeed.tech/tags/context.md>), [conversational-ai-persistence](<https://devfeed.tech/tags/conversational-ai-persistence.md>), [good-company](<https://devfeed.tech/tags/good-company.md>), [history](<https://devfeed.tech/tags/history.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [langchain](<https://devfeed.tech/tags/langchain.md>), [langchain-persistent-memory](<https://devfeed.tech/tags/langchain-persistent-memory.md>), [langchain-scylladb-integration](<https://devfeed.tech/tags/langchain-scylladb-integration.md>), [memory](<https://devfeed.tech/tags/memory.md>), [rag](<https://devfeed.tech/tags/rag.md>), [rag-chatbot-memory](<https://devfeed.tech/tags/rag-chatbot-memory.md>), [scalable-rag-architecture](<https://devfeed.tech/tags/scalable-rag-architecture.md>), [scylladb](<https://devfeed.tech/tags/scylladb.md>), [scylladb-vector-database](<https://devfeed.tech/tags/scylladb-vector-database.md>), [scylladb-vector-search](<https://devfeed.tech/tags/scylladb-vector-search.md>), [search](<https://devfeed.tech/tags/search.md>), [using](<https://devfeed.tech/tags/using.md>), [vector](<https://devfeed.tech/tags/vector.md>), [vector-search](<https://devfeed.tech/tags/vector-search.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

The example combines ScyllaDB vector search with LangChain so a RAG chatbot can retrieve documents and retain conversation history across restarts and replicas. It connects through the Cassandra-compatible driver and `cassio.init()`, embeds document chunks with local `all-MiniLM-L6-v2` embeddings, and uses LangChain's Cassandra vector store with an HNSW index. `CassandraChatMessageHistory` stores messages by `session_id`; `RunnableWithMessageHistory` loads prior turns and appends new ones, so replicas using the same ID can resume a conversation. The excerpt says embeddings can be switched to other LangChain-supported providers and identifies ScyllaDB 2026.2 as enabling this integration. The stated example is a setup walkthrough, not comparative performance evidence.

## Source excerpt

Learn how to use ScyllaDB Vector Search and persistent chat history with LangChain to build RAG chatbots that retain context across restarts and replicas.