Phase 8: Multi-Agent Systems & Platform Architecture · 45 min · Claude Code · Python
Agent Memory Architecture
A decision made and forgotten gets re-litigated. A stale decision never forgotten gets followed past its expiration date. Memory needs both a write path and a forget path.
Hiring signal: Designing a memory architecture with an explicit forgetting mechanism — not just accumulating everything indefinitely — shows you understand memory as a managed resource, not a database you only ever insert into.
What you will learn
- Distinguish short-term (session-only), working (rolling summary), and long-term (persistent, cross-session) memory tiers
- Apply the write-manage-read loop: deciding what to record, which tier it belongs in, and what to retrieve for a given task
- Explain why forgetting is as necessary as writing, and what happens when a system never forgets
- Build a memory store with real cross-session persistence and a working expiration mechanism
Introduction
Agent Memory Architecture
Three weeks ago, in one session, a team decided not to use a particular open-source library for their podcast tool's audio processing — its license conflicted with their commercial terms, a real, settled decision. This week, in a new session, an agent working on a related feature suggests that exact library again, with no memory that the question was already asked and answered. Nothing about the earlier decision persisted anywhere the new session could see it. The team spends twenty minutes re-litigating a settled question, not because anyone forgot the reasoning, but because the system architecture never gave the decision anywhere to live beyond the conversation it was made in.
Three tiers, three different lifespans
Short-term memory lives only within the current session — a scratchpad, working notes, the kind of thing c12-02-2's write_scratchpad demonstrated. It's gone once the session ends, and that's correct: most of what an agent jots down mid-task (which file it's currently reading, an intermediate calculation) has no value beyond that task. Working memory spans a session in condensed form — the rolling summary from c12-02-2's compress_conversation, useful for maintaining context across a long session without keeping every raw turn. Long-term memory is the only tier meant to survive across sessions indefinitely — real decisions, licensing constraints, lessons learned from past incidents, the kind of information that should be true and relevant regardless of which session or which agent instance is asking. The library-licensing decision belongs squarely in long-term memory; putting it in short-term memory is exactly what let it get forgotten and re-litigated.
The tier is a claim about lifespan, not importance
"Important" and "long-term" aren't the same axis. A note that's genuinely critical for finishing today's specific task but irrelevant to any future session belongs in short-term or working memory, not long-term, no matter how important it feels in the moment. Long-term memory is reserved for things that should still be true and still matter the next time anyone, in any session, asks a related question.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers Write, manage, read, When to forget, Reflexion memories: a specific, valuable kind of long-term entry, Memory as infrastructure, not an afterthought, Build It — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy