C.W.K.
Stream
Lesson 02 of 05 · published

Memory Architecture: Episodic, Semantic, Procedural

~34 min · memory, rag, structured-state

Level 0Observer
0 XP0/40 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Memory is not one bucket

Agents need different memory classes because different facts fail differently. A user preference, a failed deployment attempt, a vector-retrieved article, and a workflow recipe do not belong in the same shape.

The useful split

  • Working memory: current run state, plan, scratchpad, open questions.
  • Episodic memory: what happened in a prior run, including failures and decisions.
  • Semantic memory: stable facts and preferences.
  • Procedural memory: repeatable workflows and playbooks.
  • Vector memory: fuzzy retrieval for long notes and source chunks.
  • Structured memory: exact state where staleness or precision matters.

Source and freshness are mandatory

A memory without source, timestamp, confidence, and invalidation rule is a future hallucination with better manners. Vector search is especially dangerous here because old memories can feel semantically perfect.

Code

Memory record contract·json
{
  "id": "mem_2026_05_03_001",
  "type": "episodic",
  "subject": "agent-quest-remake",
  "content": "The first remake compressed the original too aggressively.",
  "source": "cwk-site git audit",
  "created_at": "2026-05-03T07:45:00Z",
  "confidence": 0.96,
  "expires_at": null,
  "invalidates_when": "Agent Quest is rebuilt from legacy inventory"
}
Hybrid retrieval policy·text
Need exact current status?        SQL / key-value / file pointer
Need fuzzy prior context?        vector search + source check
Need repeatable procedure?       markdown playbook
Need active run coordination?    scratchpad / run state
Need auditability?               append-only event log

External links

Exercise

Classify ten memories from a real project into working, episodic, semantic, procedural, vector, or structured storage. Include source and freshness rules.
Hint
If a wrong stale memory could cause damage, do not store it only as a vector chunk.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.