Skip to main content

Overview

JSONStorage provides a file-based JSON storage backend. Ideal for simple applications, prototyping, and scenarios where human-readable data files are preferred.

Basic Usage

File Structure

Parameters

ParameterTypeDefaultDescription
db_pathstr | None"./upsonic_json_db"Directory for JSON files
session_tablestr | None"upsonic_sessions"Session JSON file name (without .json)
user_memory_tablestr | None"upsonic_user_memories"User memory JSON file name (without .json)
knowledge_tablestr | None"upsonic_knowledge"Knowledge registry JSON file name (without .json, used by KnowledgeBase)
idstr | Noneauto-generatedStorage instance ID

Storage Type

JSONStorage is a synchronous storage implementation using file-based JSON serialization.