im not convinced the idea of giving every agent chat its own sqlite db is a good idea
it creates fragmentation in the storage layer and complexity around standard db ops.
imagine you have 10MM agent chats across your service, and thus 10MM independent sqlite dbs.
user can return to an old session at any given time, so the dbs need to be persisted indefinitely.
schema changes means either doing a migration across millions of dbs or maintaining backwards compatibility with old versions, potentially for years.
analytics and search are now across 10MM dbs, requiring a way to aggregate and query across the data.
you could setup some kind of event stream, but now need to guarantee that each change makes it into the stream. you now get fun consistency and recovery problems.
idk
doesn’t feel like the right approach and significantly more complicated