StoreBackend(
self,
*,
namespace: NamespaceFactory,
store: BaseStore | None = None
)Async version of upload_files.
| Name | Type | Description |
|---|---|---|
namespace* | NamespaceFactory | |
store | BaseStore | None | Default: None |
| Name | Type |
|---|---|
| namespace | NamespaceFactory |
| store | BaseStore | None |
Backend that stores files in LangGraph's BaseStore (persistent).
Uses LangGraph's Store for persistent, cross-conversation storage. Files are organized via namespaces and persist across all threads.
Files are scoped by the caller-supplied namespace factory (e.g. per-user
or per-assistant isolation).
Callable that receives a Runtime and returns a namespace
tuple for scoping store operations. Wildcards (*) are forbidden.
Optional BaseStore instance. When provided, this store
is used directly. When None, the store is obtained at call time
via get_store(), which requires a LangGraph graph execution
context.
List files and directories in the specified directory (non-recursive).
Read file content for the requested line range.
Async version of read using native store async methods.
This avoids sync calls in async context by using store.aget directly.
Write content to a file, creating it or overwriting it if it already exists.
Returns WriteResult on success or error.
Async version of write using native store async methods.
This avoids sync calls in async context by using store.aget/aput directly.
Edit a file by replacing string occurrences.
Returns EditResult on success or error.
Async version of edit using native store async methods.
This avoids sync calls in async context by using store.aget/aput directly.
Delete a file or directory from the store.
Deleting a path removes the exact key file_path plus every key nested
under it (the prefix file_path + "/"), so a directory is removed
recursively. Wildcards (e.g. *) in file_path are treated literally.
Async version of delete using native store async methods.
Search store files for a literal text pattern.
Find files matching a glob pattern in the store.
Upload multiple files to the store.
Binary files (images, PDFs, etc.) are stored as base64-encoded strings. Text files are stored as utf-8 strings.
Download multiple files from the store.