Skip to main content

Overview

AsyncSqliteStorage provides an asynchronous file-based SQLite storage backend using SQLAlchemy with aiosqlite. Ideal for async applications, local development, and single-node deployments.

Install

Install the SQLite storage optional dependency group:

Basic Usage

Parameters

ParameterTypeDefaultDescription
db_filestrNonePath to the SQLite database file
db_urlstrNoneSQLAlchemy async database URL (e.g., sqlite+aiosqlite:///./data.db)
db_engineAsyncEngineNonePre-configured SQLAlchemy AsyncEngine
session_tablestrNoneCustom name for the session table
user_memory_tablestrNoneCustom name for the user memory table
knowledge_tablestrNoneCustom name for the knowledge registry table (used by KnowledgeBase)
idstrNoneUnique identifier for this storage instance
If no connection parameter is provided, the storage defaults to creating ./upsonic.db in the current directory.