Sahaj.blogs

Day page

17 Apr 2026

Study

LangChain · Memory and message history

Chat models are stateless; RunnableWithMessageHistory stores and re-sends past messages per session, with trimming to keep the history within limits.

  • The model remembers nothing between calls; "memory" means storing the conversation and sending it again.
  • Each session_id gets its own history, so two users don't share context.

Read the post →