R083 · Agent architecture › Memory and context

15 building blocks of agent memory, checked

Read the original

agent-memoryagent-architecturelearning-resourcesagent-governancedata-privacyteaching

Bottom line

The post is a usable vocabulary list for agent memory, and its third group is its best part. Its repo links are weak, though: 6 of 15 fit well, and the rest point at general infrastructure (Redis, Chroma, FAISS) or at the wrong tool (DSPy for conflict resolution).

Maryam Miradi's post (2026-11-13) lists 15 patterns in three groups. Types say what is remembered (working, episodic, semantic, procedural, long-term). Mechanisms say how it is processed (summarization, retrieval, consolidation, compression, graph memory). Control says what to trust, forget or isolate (decay, forgetting, conflict resolution, provenance, isolation). Each pattern gets a one-line definition and one GitHub repo.

Three things to know before you use it:

Caveats: the post funnels to the author's course guide, and the "400+ agents" claim is unverified.

Definitions are paraphrased from the post. "Fit" asks whether the repo is a place to learn that pattern, not whether the repo is good.

#PatternPost's definitionLinked repoFitNote
1Working memoryCurrent task and context available for reasoningletta-ai/lettaGoodMemGPT lineage: in-context memory blocks the agent edits itself. The README says active source has moved to letta-ai/letta-code.
2Episodic memoryPast interactionsmicrosoft/autogenWeakAutoGen has a generic memory interface, not an episodic store. Its README says it is in maintenance mode and points to Microsoft Agent Framework.
3Semantic memoryReusable facts, preferences, knowledgemem0ai/mem0Goodv3 extraction is ADD-only, with entity linking and time-aware retrieval.
4Procedural memoryInstructions and workflows for recurring taskslangchain-ai/langmemGoodRefines the agent's prompt from interactions.
5Long-term memoryKnowledge across sessionslangchain-ai/langgraphPartialLangGraph's Store persists across threads. "Long-term" is a lifetime, not a type.
6SummarizationLong histories into concise noteslangchain-ai/langchainPartialA whole framework; summarization is one model call.
7RetrievalFind relevant memories when neededfacebookresearch/faissPartialA vector index only. No keyword search, recency or metadata filters.
8ConsolidationMerge related memories, update outdated onesrun-llama/llama_indexWeakLangMem's background manager names "extract, consolidate, update" directly.
9CompressionSmaller memory, same meaningmicrosoft/LLMLinguaGoodCompresses prompts at read time, not stored memories.
10Graph memoryFacts and relationships for structured reasoninggetzep/graphitiGoodAlso the best link for 13 and 14 (next section).
11DecayOlder memories lose importanceredis/redisWeakA TTL is a cliff, not decay. The usual reference is a ranking score: recency, importance and relevance combined, as in the Generative Agents paper (2023).
12ForgettingRemove stale or unused memorieschroma-core/chromaWeakA delete API. Weaviate has per-collection object TTL, which is closer.
13Conflict resolutionDetect contradictions, pick trusted factsstanfordnlp/dspyWrongDSPy optimizes prompts and programs. Graphiti invalidates superseded facts instead of deleting them.
14ProvenanceTrack sources for verificationdeepset-ai/haystackWeakDocument metadata only. Graphiti traces every derived fact to a raw "episode".
15Memory isolationSeparate memories by user, task, workspaceweaviate/weaviateGoodNative multi-tenancy and role-based access control.

Tally: 6 good, 3 partial, 5 weak, 1 wrong. If you teach from this list, swap in Graphiti for 13 and 14, LangMem for 8, and a recency-weighted ranking for 11.

Corrections

The three groups mix four different questions, and sorting the 15 by question makes the design choices visible.

Two more corrections inside Group 3:

What's missing

The list is all about storing and processing memory, and silent on deciding what gets in and proving it helps.

A memory pipeline to design against

Put the 15 patterns on five stages in order, and each stage gets a test you can run. Stage 1 is the one the post leaves out.

StageWhat it decidesPatterns from the postTest it with
1. AdmitWhat may enter, from whom, at what scope and expiryNoneA one-off instruction does not persist. An unsourced claim from a tool is rejected.
2. RecordAn append-only raw log, with a source on every entry14 ProvenanceEvery derived memory resolves to a log entry.
3. DeriveNotes, facts, procedures and graph edges built from the log3, 4, 6, 8, 9, 10A/B against retrieval over the raw log at the same token budget.
4. RetrieveWhat goes into context for this step1, 7, 9, 11Recall at k and answer accuracy. Regressions against a no-memory run, reported separately.
5. GovernTrust, expiry, deletion, tenancy11, 12, 13, 15A planted contradiction resolves to the newer sourced fact. A delete removes every derived copy. No cross-tenant hits.

Patterns 2 and 5 (episodic, long-term) are not stages: episodic memory is mostly stage 2, and long-term describes stages 2 to 5 together.

Failure modes and review checklist

Most memory failures are a missing step around the store, not a bad store.

FailureWhat you seeStage that should catch it
A one-off becomes a rule"Use this address for this order" sticks for every later order1 Admit
A guess stored as a factThe agent's own inference comes back later as ground truth1 Admit
Poisoned memoryText from a page or tool result steers every later session1 Admit, 5 Govern
Summary driftA note no longer matches its sources, and nothing checks2 Record, 3 Derive
Stale fact winsAn old preference outranks a newer one4 Retrieve, 5 Govern
Memory hurtsThe agent fails tasks it solves with memory off3 Derive, 4 Retrieve
Delete misses copiesA removed item survives in a summary or embedding5 Govern
Cross-tenant leakA shared index without a tenant filter returns another user's memory5 Govern

Review checklist for any agent memory design:

  1. Who can write to memory, and is tool or web output kept apart from user-stated facts?

  2. Does every memory carry a scope and an expiry, set at write time?

  3. Is there an append-only raw log, and does every derived memory link back to it?

  4. Which steps throw away evidence (summarize, consolidate, compress), and has each been A/B tested against raw-history retrieval at the same token budget?

  5. Are gain and regression against a no-memory run reported separately?

  6. How are contradictions resolved, and does the rule use source and time rather than a model's opinion?

  7. Does a delete reach every derived copy, and is there a test that proves it?

  8. Is tenant isolation enforced in the store, not just in the prompt?

  9. Can the user see and correct what is remembered?

  10. What do memory writes cost per turn in model calls and latency?

EntryHow it relates
R002 The 5 layers of agent memoryThe closest match: the same content types, with the point that the maintenance step is what usually goes missing.
R040 WikiTraceProvenance done properly: each lesson keeps its trajectory. Measures memory-induced regressions.
R057 SoMemAn append-only source log under agent-written notes, with a validator that enforces links. Also the cost data point.
R059 Memory TaxThe baseline every summarize, consolidate or compress step should beat.
R028 auto-ontology-mcpTyped memory with a source and quote per fact.
R055 RelateGraph memory as an embedded store.
R074 OmnigraphA branch per agent as a merge rule for several writers.
R036 Claude 101Anthropic's memory evals: a small injected layer wins; say what memory is for.
R079 15 agent design patternsThe same author's sister post, with the same format and the same strengths and limits.

Sources

Connections

See R083 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.