0Pricing
AI Agents · Lesson

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

  1. Short-Term Memory in the Context Window
  2. Why Long Contexts Don't Scale
  3. Summarisation as Compression
  4. Simple Memory Stores (Key-Value)
← Back to AI Agents