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-classicmemorysimpleSimpleMemory
    Class●Since v1.0

    SimpleMemory

    Copy
    SimpleMemory()

    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: dict[str, Any]
    attribute
    memory_variables: list[str]
    method
    load_memory_variables
    method
    save_context

    Nothing should be saved or changed, my memory is set in stone.

    method
    clear

    Nothing to clear, got a memory like a vault.

    Simple Memory.

    Simple memory for storing context or other information that shouldn't ever change between prompts.