Skip to content
Duoduo Mediaevidence to decision

Package 36 · Section 11.7

Memory and Context Governance

Let agents learn from prior cases and preferences without leaking data, overriding authoritative records or generalizing from incompatible cases.

Track
I · Agentic decision systems
Level
Practitioner
Version
v1.0
Status
In validation · catalog only
Explanation depthDepth

Learning objectives

  • Distinguish working, episodic, semantic, procedural and preference memory.
  • Apply tenant, role and field-level authorization to memory retrieval.
  • Set retention, versioning and context rules so later agents do not misuse earlier outcomes.

In brief

Agents remember at several levels: working state for the current case, episodic history of past cases, semantic knowledge, procedural rules and explicit preferences. Each type needs its own controls so memory helps decisions without leaking data or overriding authoritative records.

Core concepts

36.1Memory types

Working memory holds the current plan, evidence and partial results in durable typed state. Episodic memory holds prior cases, approvals and outcomes. Semantic memory holds versioned policies and validated facts. Procedural memory holds workflow templates as code or reviewed configuration. Preference memory holds explicit user or organization preferences with consent and expiry.

36.2Governance rules

Summaries link back to source state and never silently replace authoritative records. Memory retrieval obeys the same tenant, role and field-level authorization as primary data.

Outcome memories record context and policy version so later agents do not generalize from incompatible cases. Sensitive transient context is minimized and deleted on schedule.

Worked example

A similar case that should not be copied

Situation: An HR policy agent retrieves a prior case where a remote-work exception was granted.

  1. 1The stored outcome includes the policy version 2025.3 and region DE.
  2. 2The current request is region US under policy 2026.1, which removed that exception.
  3. 3The agent uses the prior case only as context and cites the current policy as authority.

Outcome: The answer reflects current policy, and the memory policy test suite gains a version-mismatch case.

Decision rules

  • Do not treat chat history as authoritative business state.
  • Apply primary-data access control to every memory read.
  • Store context and policy version with every outcome.
  • Procedural memory is reviewed code, not free model memory.

Common pitfalls

  • Cross-tenant similarity search.
  • Stale summaries preferred over current records.
  • Indefinite retention of sensitive context.

Key vocabulary

Episodic memory
Records of prior cases, approvals and outcomes.
Semantic memory
Versioned domain knowledge with provenance and effective dates.
Memory contamination
Applying a stored outcome to a case with incompatible context.

Tutorial outline

  1. 36.1Memory types, their contents and the control each one requires.
  2. 36.2Why summaries must link back to source state.
  3. 36.3Contamination: copying a prior decision into a case with a different policy version.

Required artifacts

Memory policy, contamination test suite and retention schedule.

Evaluation evidence

Isolation, staleness handling, contamination rate, retention compliance and useful recall.