LongTermMemory
Persistent memory backed by SQLite.
Usage
LongTermMemory()Entries persist across sessions and are stored in a SQLite database file. Supports search by key prefix, tags, and full listing.
Parameters
path: str | Path = ":memory:"-
Path to the SQLite database file. Use
":memory:"for an in-memory database (useful for testing).
Examples
import talk_box as tb
ltm = tb.LongTermMemory("my_memory.db")
ltm.set("preference", {"theme": "dark", "language": "en"})
ltm.get("preference") # {"theme": "dark", "language": "en"}
ltm.search(tags=["user"])
ltm.close()