One thing cloud chatbots do badly is remember you. Each session starts from zero. When I built Avelina, a self-hosted personal AI assistant that lives in Telegram, persistent memory was the whole point. Here is the architecture I landed on — all local, no external vector DB.

The problem: statelessness

An LLM call is stateless. To make an assistant that actually knows your history, you need to store facts across sessions and retrieve the relevant ones on every turn. For a self-hosted AI assistant you also want this to run on a cheap VPS with no third-party services.

Storage: plain SQLite

I keep several tables in a local SQLite database: