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.
The namespace can include an optional assistant_id for multi-agent isolation.
StoreBackend(
self,
runtime: object = None,
*,
store: BaseStore | None = None,
namespace: NamespaceFactory | None = None,
file_format: FileFormat = 'v2'
)| Name | Type | Description |
|---|---|---|
runtime | object | Default: NoneDeprecated - accepted for backward compatibility but
ignored. Store and context are now obtained via
|
store | BaseStore | None | Default: NoneOptional |
namespace | NamespaceFactory | None | Default: NoneOptional callable that takes a BackendContext and returns a namespace tuple. This provides full flexibility for namespace resolution. We forbid * which is a wild card for now. If None, uses legacy assistant_id detection from metadata (deprecated). Note : This parameter will be required in version 0.5.0. !!!! Warning: This API is subject to change in a minor version. |
file_format | FileFormat | Default: 'v2'Storage format version. |
| Name | Type |
|---|---|
| runtime | object |
| store | BaseStore | None |
| namespace | NamespaceFactory | None |
| file_format | FileFormat |
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.
Create a new file with content.
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.
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.
Async version of ls.
Async version of grep.
Async version of glob.
Async version of upload_files.
Async version of download_files.
List all files in a directory with metadata.
Async version of ls_info.
Find files matching a glob pattern.
Async version of glob_info.
Search for a literal text pattern in files.
Async version of grep_raw.