Skip to content

Consolidating conversation archives into long-term memory

Next step. Build the long term context memory database for the LLM. So, I wrote a script that'll take all the little SQLite databases I've been using to track context on a per session level, and I'm using the LLM to summarize them, process it all as JSON, and keyword it, so it can be indexed, and searched by the model in real time.

It's interesting. The top level memories are formatted like skeets. Short summary, 300 characters, dated, weighted, and keyworded by the AI. But, since we're doing it by the block, the agent should be able to look up the specifics of the memory by looking at the detail table, which has the whole block in it... unless it's a code block.

Code blocks are handled by date/project/path, and pulled manually from the file system. It's next to impossible to store that stuff in the database properly, and we shouldn't try. Bad separation of concerns there, if we did it that way.

Now that we have a functional memories database with context going back two months, I can finish building out the chat, that's going to sit on top of the command system I wrote yesterday.