Backend that stores files in agent state (ephemeral).
Uses LangGraph's state management and checkpointing. Files persist within a conversation thread but not across threads. State is automatically checkpointed after each agent step.
Reads and writes go through LangGraph's CONFIG_KEY_READ /
CONFIG_KEY_SEND so that state updates are queued as proper channel
writes rather than returned as files_update dicts.
StateBackend(
self,
runtime: object = None,
*,
file_format: FileFormat = 'v2'
)| Name | Type | Description |
|---|---|---|
runtime | object | Default: NoneDeprecated - accepted for backward compatibility but
ignored. State is now read/written via |
file_format | FileFormat | Default: 'v2'Storage format version. |
| Name | Type |
|---|---|
| runtime | object |
| file_format | FileFormat |
List files and directories in the specified directory (non-recursive).
Read file content for the requested line range.
Create a new file with content.
The update is queued directly via CONFIG_KEY_SEND.
Edit a file by replacing string occurrences.
The update is queued directly via CONFIG_KEY_SEND.
Search state files for a literal text pattern.
Get FileInfo for files matching glob pattern.
Upload multiple files to state.
Download multiple files from state.
Async version of ls.
Async version of read.
Async version of grep.
Async version of glob.
Async version of write.
Async version of edit.
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.