Delete a path, recursively removing anything nested under it.
This method is optional. Backends that do not implement it inherit this
default, which raises NotImplementedError. Callers that need to support
a mix of backends should guard with
supports_delete before
calling, or catch NotImplementedError.
Deletion is recursive: it removes file_path plus everything nested
under it. On hierarchical backends (e.g.
FilesystemBackend)
that means a directory and its contents; on key-value backends it means
the exact key plus every key sharing the file_path + "/" prefix.
Protocol for pluggable memory backends (single, unified).
Backends can store files in different locations (state, filesystem, database, etc.) and provide a uniform interface for file operations.
All file data is represented as dicts with the following structure:
{
"content": str, # Text content (utf-8) or base64-encoded binary
"encoding": str, # "utf-8" for text, "base64" for binary data
"created_at": str, # ISO format timestamp
"modified_at": str, # ISO format timestamp
}
Legacy data may still contain "content": list[str] (lines split on
\\n). Backends accept this for backwards compatibility and emit a
LangChainDeprecationWarning (a DeprecationWarning subclass).