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

    VectorStoreRetrieverMemory

    Copy
    VectorStoreRetrieverMemory()

    Bases

    BaseMemory

    Attributes

    Methods

    Inherited fromBaseMemory

    Attributes

    Amodel_config

    Inherited fromSerializable(langchain_core)

    Attributes

    Alc_secretsAlc_attributes
    View source on GitHub
    A
    model_config

    Methods

    Mis_lc_serializableMget_lc_namespaceMlc_idMto_jsonMto_json_not_implemented
    attribute
    retriever: VectorStoreRetriever
    attribute
    memory_key: str
    attribute
    input_key: str | None
    attribute
    return_docs: bool
    attribute
    exclude_input_keys: Sequence[str]
    attribute
    memory_variables: list[str]
    method
    load_memory_variables
    method
    aload_memory_variables
    method
    save_context
    method
    asave_context
    method
    clear
    method
    aclear

    Vector Store Retriever Memory.

    Store the conversation history in a vector store and retrieves the relevant parts of past conversation based on the input.

    VectorStoreRetriever object to connect to.

    Key name to locate the memories in the result of load_memory_variables.

    Key name to index the inputs to load_memory_variables.

    Whether or not to return the result of querying the database directly.

    Input keys to exclude in addition to memory key when constructing the document

    The list of keys emitted from the load_memory_variables method.

    Return history buffer.

    Return history buffer.

    Save context from this conversation to buffer.

    Save context from this conversation to buffer.

    Nothing to clear.

    Nothing to clear.