The sqlite backend persists sessions to a local SQLite file. It needs no external database service, but unlike local, sessions are written to disk and therefore survive across processes and restarts.
When to use
- Single-node deployments that need persistence;
- Local development where you want to keep past sessions;
- Small data volumes with no need for distributed access.
Usage
The output is chat_01, confirming that the session was created and read back. This example does not call a model. For conversations, pass the same stm to Runner(short_term_memory=stm, agent=agent) and keep the app, user, and session identifiers consistent
If the DB file doesn’t exist, VeADK creates it automatically (including any parent directories) and resolves the path to an absolute one.
You can also pass a connection string directly via db_url, in which case backend and local_database_path are both ignored:
Parameters
ShortTermMemory constructor parameters (sqlite)
Environment variables
The sqlite backend reads no environment variables; all configuration comes from constructor parameters.
Need distributed persistence? Use MySQL or PostgreSQL.
Store the SQLite file in a writable persistent directory. Containers need a persistent volume to retain it across replacement. The default /tmp path may be cleaned by the operating system and is not a backup. Create parent directories yourself when connecting through db_url Last modified on September 19, 2026