Creates a new Redis store.
Configuration options for the Redis store.
Private
Optional
_redisOptional
__tokenizedPrivate
clientPrivate
connectionPrivate
dataPrivate
isOptional
ttlPrivate
vectorsReturns the store's index configuration
Execute multiple operations in a single batch. Implementation of BaseStore abstract method.
Array of operations to execute
Promise resolving to results matching the operations
Private
cosinePrivate
createPrivate
doesPrivate
extractPrivate
getPrivate
getPrivate
getPrivate
getInsert vector embeddings
The texts to embed
The items containing the texts
Optional
embeddings: number[][]Optional pre-computed embeddings
Promise that resolves when vectors are inserted
List and filter namespaces in the store. Used to explore data organization and navigate the namespace hierarchy.
Optional
options: { Options for listing namespaces
Optional
limit?: numberOptional
maxOptional
offset?: numberOptional
prefix?: string[]Optional
suffix?: string[]Promise resolving to list of namespace paths
// List all namespaces under "documents"
await store.listNamespaces({
prefix: ["documents"],
maxDepth: 2
});
// List namespaces ending with "v1"
await store.listNamespaces({
suffix: ["v1"],
limit: 50
});
Private
listPrivate
putPrivate
redisSearch for items. Implementation of the BaseStore abstract method.
Optional
filter?: Record<string, any>Optional
limit?: numberOptional
offset?: numberOptional
query?: stringPrivate
store
A Redis-based key-value store for LangGraph state.
This store persists data in Redis, providing durable storage for graph state. It can be used as a standalone key-value store or with LangGraph's checkpointing.
Example
Example
Example
Example
Example
Example
Example
Example