JsonDb is a class that implements the Db interface using JSON files as the backend storage system. It provides a simple, file-based storage solution for agent sessions with each session stored in a separate JSON file.
Methods
upsert_sessions
Bulk upsert multiple sessions for improved performance on large datasets.
Parameters:
sessions(List[Session]): List of sessions to upsertdeserialize(Optional[bool]): Whether to deserialize the sessions. Defaults toTrue
List[Union[Session, Dict[str, Any]]]
upsert_memories
Bulk upsert multiple memories for improved performance on large datasets.
Parameters:
memories(List[UserMemory]): List of memories to upsertdeserialize(Optional[bool]): Whether to deserialize the memories. Defaults toTrue
List[Union[UserMemory, Dict[str, Any]]]