LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-classicmemorycombinedCombinedMemory
    Class●Since v1.0

    CombinedMemory

    Copy
    CombinedMemory()

    Bases

    BaseMemory

    Attributes

    Methods

    Inherited fromBaseMemory

    Attributes

    Amodel_config

    Methods

    Maload_memory_variables
    —

    Async return key-value pairs given the text input to the chain.

    Masave_context
    —

    Async save the context of this chain run to memory.

    M
    View source on GitHub
    aclear
    —

    Async clear memory contents.

    Inherited fromSerializable(langchain_core)

    Attributes

    Alc_secretsAlc_attributesAmodel_config

    Methods

    Mis_lc_serializableMget_lc_namespaceMlc_idMto_jsonMto_json_not_implemented
    attribute
    memories: list[BaseMemory]

    For tracking all the memories that should be accessed.

    attribute
    memory_variables: list[str]

    All the memory variables that this instance provides.

    method
    check_input_key

    Check that if memories are of type BaseChatMemory that input keys exist.

    method
    load_memory_variables

    Load all vars from sub-memories.

    method
    save_context

    Save context from this session for every memory.

    method
    clear

    Clear context from this session for every memory.

    Combining multiple memories' data together.