interactive · 11 min

Conversation Memory

Objective: keep a turn transcript and, when it exceeds a budget, compress the oldest turn into a running summary so context stays bounded.

The same shape as real summarisation, with a trivial string compressor instead of a model call (subsystem D). The policy — your Foundations MockLLM seam — only ever sees context(), never the raw unbounded log.

Best practice: bound working memory explicitly; what to keep is a policy decision you should be able to test deterministically.

Next: Memory Pitfalls