Module 6.2
Ten turns into a Nimbus-bot conversation, the user circles back to something mentioned six turns ago. Three memory architectures handle that very differently — see exactly what each one hands the model right now.
The math
Notice the third one isn't a new mechanism at all — it's Module 1.2's cosine ranking, run over conversation turns instead of documents.
The code
def sliding_window(turns, n=4):
return turns[-n:]
def with_summary(turns, n=2):
old, recent = turns[:-n], turns[-n:]
summary = running_summary or summarize(old) # one extra LLM call, done periodically
return [summary] + recent
def vector_memory(turns, new_turn, k=2):
scores = [cosine_sim(embed(new_turn), embed(t)) for t in turns]
top_k = argsort(scores)[-k:] # Module 1.2, again
return [turns[i] for i in sorted(top_k)] + [turns[-1]]
Production agents often run more than one of these at once — a sliding window for immediate coherence, plus vector retrieval for "did we ever discuss this before."
The Nimbus thread
The sliding window has already dropped the one turn (#4) that contains the actual quota number — Nimbus-bot would have to guess or ask again. Summarization keeps the gist ("quota was exceeded") but may have compressed away the exact 50GB figure. Vector retrieval re-surfaces turn #4 specifically because the new question is semantically about the same thing, regardless of how many turns ago it was — the same mechanism Module 5 used for documents, now pointed at the conversation itself.
So what
Agent memory isn't one design — it's a real tradeoff between what's cheap to keep and what's expensive to forget.