ContextHubBackend: Store files in a LangSmith Hub agent repo (persistent).
Create a FileData object with timestamps.
Perform string replacement with occurrence validation.
Slice file data to the requested line range without formatting.
Returns raw text for the requested window. Line-number formatting is applied downstream by the middleware layer.
Result from backend edit operations.
Data structure for storing file contents with metadata.
Result of a single file download operation.
The response is designed to allow partial success in batch operations.
The errors are standardized using FileOperationError literals for certain
recoverable conditions for use cases that involve LLMs performing
file operations.
Structured file listing info.
Minimal contract used across backends. Only path is required.
Other fields are best-effort and may be absent depending on backend.
Result of a single file upload operation.
The response is designed to allow partial success in batch operations.
The errors are standardized using FileOperationError literals for certain
recoverable conditions for use cases that involve LLMs performing
file operations.
Result from backend glob operations.
A single match from a grep search.
Result from backend grep operations.
Result from backend ls operations.
Result from backend read operations.
Result from backend write operations.
Backend that stores files in a LangSmith Hub agent repo (persistent).
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
}