Simple Memory Stores (Key-Value)
Persist facts the user mentions (name, preferences) in a key-value store and inject them into the system prompt on each turn.
The Cheapest Long-Term Memory
Before vector DBs and embeddings, there is the humble key-value store. For storing user-specific facts (name, preferences, settings), this is all you need.
What to Store
Good candidates for KV memory:
- User name and language
- Preferences (units, timezone, tone)
- Sticky context (current project, current topic)
- Recent tool credentials / API tokens
All lessons in this course
- Short-Term Memory in the Context Window
- Why Long Contexts Don't Scale
- Summarisation as Compression
- Simple Memory Stores (Key-Value)