Skip to main content
This guide will help you get started with in-memory key-value stores. For detailed documentation of all InMemoryByteStore features and configurations head to the API reference.

Overview

The InMemoryByteStore is a non-persistent implementation of a ByteStore that stores everything in a Python dictionary. It’s intended for demos and cases where you don’t need persistence past the lifetime of the Python process.

Integration details

Installation

The LangChain InMemoryByteStore integration lives in the langchain-core package:

Instantiation

Now you can instantiate your byte store:

Usage

You can set data under keys like this using the mset method:
And you can delete data using the mdelete method:

API reference

For detailed documentation of all InMemoryByteStore features and configurations, head to the API reference