Skip to content

feat: SQLite-backed persistent storage for session logs #17

@rosspeili

Description

@rosspeili

Problem Statement

Currently, session history is kept entirely in RAM and only written to disk as a flat file upon exit. This makes the system vulnerable to data loss during crashes and limits our ability to perform complex queries across multiple historical sessions (e.g., "Find all times Viktor mentioned policy X").

Proposed Solution

  1. Integrate a lightweight local database (SQLite) into the storage.py module.
  2. Automatically stream every turn/message into the database as it happens, rather than waiting for the session to end.
  3. Replace the current flat-file lookup with a robust SQL-based storage layer that can handle thousands of messages across hundreds of independent rooms.

Alternatives Considered

None. SQLite is the gold standard for robust, local-first application data.

Priority

Low 🟢

Additional Context

This is an infrastructural requirement for the upcoming Web UI and long-term agent memory features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions