Module 10 · cognitive feature

Memory that survives the session

A standard LLM forgets everything between sessions and rots context inside one. The FDE deploys tiers instead: a scratchpad for mid-task reasoning, episodic vector memory for what happened, and semantic graph memory for what is durably true about the organisation. Shrink the scratchpad budget below and watch what gets evicted.

$ python -m fde_toolkit memory

current sessionscratchpad budget

Short-term scratchpad

Mid-task ReAct reasoning. Cleared when the task ends.

40/512 tok
  • keepscratch.calcSum of last 24h transfers by CUST-4412 = 27,400 USD.13t
  • keepscratch.alertAlert AML-4471 open: 15,000 USD to GB counterparty.13t
  • keepscratch.stepChecked sanctions list — no hit on beneficiary BEN-7781.14t

Long-term episodic (vector)

Past sessions, decisions and their outcomes. Retrieved by similarity.

83/4096 tok
  • keepep.s2.decisionSession 2: escalation goes to the named MLRO, never to a shared mailbox.18t
  • keepep.s1.decisionSession 1: VP Compliance rejected auto-closing alerts below 1,000 USD; wants them sampled instead.25t
  • keepep.s1.frictionSession 1: the client's Oracle extract times out past 500k rows; use the incremental job.22t
  • keepep.s2.patternSession 2: three false positives all came from payroll batch narratives.18t

Long-term semantic (graph)

Durable organisational facts and preferences. Retrieved by traversal.

60/8192 tok
  • keepsem.policy.dualAny agent-initiated payment above 10,000 USD requires dual human approval.19t
  • keepsem.graph.ownerCUST-4412 is a subsidiary of NMC Health PLC; exposure is measured at group level.20t
  • keepsem.pref.toneOrganisation preference: findings are written for a regulator, not a data scientist.21t

Recall

importance-weighted similarity

  • episodicep.s1.decision

    Session 1: VP Compliance rejected auto-closing alerts below 1,000 USD; wants them sampled instead.

Context rot

scratchpad-only agent, 12 turns

  • turn 1
    1.00
  • turn 2
    1.00
  • turn 3
    1.00
  • turn 4
    1.00
  • turn 5
    1.00
  • turn 6
    1.00
  • turn 7
    1.00
  • turn 8
    0.88
  • turn 9
    0.78
  • turn 10
    0.70
  • turn 11
    0.64
  • turn 12
    0.58

Recall is the share of earlier turns still inside the window. Once it drops, the agent is not reasoning badly — it simply cannot see what it decided ten minutes ago. That is the argument for tiers, in one chart.