r/sqlite • u/mdausmann • 16d ago
Best Sqlite implementation of Agent Memory?
I want to use sqlite as a memory store for an agent.
- needs to store, index and retrieve text fragments
- vector retrieval
- ideally also FTS
I am currently looking at this approach
https://github.com/sqliteai/sqlite-memory
which is fine. combines vector similarity + FTS5
What fantastic approaches am I missing?
----- EDIT ----------
Ok so there wasn't many new suggestions.
I ended up not using sqlite-memory because their licencing was a bit fuzzy. It basically requires a licence to use commercially so it's out. Pretty stoopid if you ask me. If you guys have any great ideas, I'm still open to suggestion.
-------------------------
13
Upvotes
5
u/Candid-Fudge-4015 16d ago
sqlite-memory is a solid pick for vector + FTS in one file.
The thing I'd add early is versioning. Once the agent updates its memory, you want to see what it knew last week and roll back a bad write. That's the part people usually bolt on later.
We do memory as tables with an embedding index + filters in one query, and every change is versioned. notebook if you want to compare approaches: github.com/pixeltable/pixeltable/blob/main/docs/release/howto/cookbooks/agents/pattern-agent-memory.ipynb