StateBackend(
self,
runtime: object = None,
*,
file_format: FileFormat = 'v2'
)Async version of glob.
| Name | Type | Description |
|---|---|---|
runtime | object | Default: None |
file_format | FileFormat | Default: 'v2' |
| Name | Type |
|---|---|
| runtime | object |
| file_format | FileFormat |
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.
Deprecated - accepted for backward compatibility but
ignored. State is now read/written via get_config().
Storage format version. "v1" stores
content as list[str] (lines split on \\n) without an
encoding field. "v2" (default) stores content as a
plain str with an encoding field.
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.