Skip to main content

[ ![🦜️🔗 Langchain](/img/brand/wordmark.png) ![🦜️🔗
Langchain](/img/brand/wordmark-dark.png) ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API  ](https://api.python.langchain.com)

More

  * [ People ](/docs/people/)
  * [ Versioning ](/docs/packages)
  * [ Changelog ](/docs/changelog)
  * [ Contributing ](/docs/contributing)
  * [ Templates ](/docs/templates/)
  * [ Cookbooks  ](https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md)
  * [ Tutorials ](/docs/additional_resources/tutorials)
  * [ YouTube ](/docs/additional_resources/youtube)

🦜️🔗

  * [ LangSmith  ](https://smith.langchain.com)
  * [ LangSmith Docs  ](https://docs.smith.langchain.com/)
  * [ LangServe GitHub  ](https://github.com/langchain-ai/langserve)
  * [ Templates GitHub  ](https://github.com/langchain-ai/langchain/tree/master/templates)
  * [ Templates Hub  ](https://templates.langchain.com)
  * [ LangChain Hub  ](https://smith.langchain.com/hub)
  * [ JS/TS Docs  ](https://js.langchain.com)

[ 💬  ](https://chat.langchain.com) [ ](https://github.com/langchain-
ai/langchain)

Search

  * [ Get started ](/docs/get_started)

    * [ Introduction ](/docs/get_started/introduction)
    * [ Installation ](/docs/get_started/installation)
    * [ Quickstart ](/docs/get_started/quickstart)
    * [ Security ](/docs/security)
  * [ LangChain Expression Language ](/docs/expression_language/)

    * [ Get started ](/docs/expression_language/get_started)
    * [ Why use LCEL ](/docs/expression_language/why)
    * [ Interface ](/docs/expression_language/interface)
    * [ Streaming ](/docs/expression_language/streaming)
    * [ How to ](/docs/expression_language/how_to/)

    * [ Cookbook ](/docs/expression_language/cookbook/)

    * [ LangChain Expression Language (LCEL) ](/docs/expression_language/)
  * [ Modules ](/docs/modules/)

    * [ Model I/O ](/docs/modules/model_io/)

    * [ Retrieval ](/docs/modules/data_connection/)

    * [ Agents ](/docs/modules/agents/)

    * [ Chains ](/docs/modules/chains)
    * [ More ](/docs/modules/memory/)

      * [ Memory ](/docs/modules/memory/)

        * [ Chat Messages ](/docs/modules/memory/chat_messages/)
        * [ Memory types ](/docs/modules/memory/types/)

        * [ [Beta] Memory ](/docs/modules/memory/)
        * [ Memory in LLMChain ](/docs/modules/memory/adding_memory)
        * [ Memory in the Multi-Input Chain ](/docs/modules/memory/adding_memory_chain_multiple_inputs)
        * [ Memory in Agent ](/docs/modules/memory/agent_with_memory)
        * [ Message Memory in Agent backed by a database ](/docs/modules/memory/agent_with_memory_in_db)
        * [ Customizing Conversational Memory ](/docs/modules/memory/conversational_customization)
        * [ Custom Memory ](/docs/modules/memory/custom_memory)
        * [ Multiple Memory classes ](/docs/modules/memory/multiple_memory)
      * [ Callbacks ](/docs/modules/callbacks/)

  * [ LangServe ](/docs/langserve)
  * [ LangSmith ](/docs/langsmith/)

  * [ LangGraph ](/docs/langgraph)

  * [ ](/)
  * [ Modules  ](/docs/modules/)
  * More 
  * Memory 

On this page

#  [Beta]  Memory

Most LLM applications have a conversational interface. An essential component
of a conversation is being able to refer to information introduced earlier in
the conversation. At bare minimum, a conversational system should be able to
access some window of past messages directly. A more complex system will need
to have a world model that it is constantly updating, which allows it to do
things like maintain information about entities and their relationships.

We call this ability to store information about past interactions "memory".
LangChain provides a lot of utilities for adding memory to a system. These
utilities can be used by themselves or incorporated seamlessly into a chain.

Most of memory-related functionality in LangChain is mark