#memory compaction mixing

1 messages · Page 1 of 1 (latest)

sinful spindle
#

propose memory skills like qmd that dont mix memory between two sessions running on the same agent

sullen urchinBOT
#

Yep — this is a real gap today.

qmd is agent-scoped right now, so two sessions on the same agent can still pull from the same indexed memory corpus.
(And memory.qmd.scope is mostly access gating, not true per-session partitioning.)

If you want no mixing, here are good design proposals:

  1. Per-session memory namespaces (hard isolation)
  • Store/index by sessionKey (or sessionId) into separate collections.
  • Query default = current session namespace only.
  • Optional fallback chain: session -> agent-shared.
  1. Two-lane memory model
  • session-private lane (default writes)
  • agent-shared lane (explicit promotion only, e.g. “promote this memory”)
  • Prevents accidental global contamination.
#
  1. Scoped compaction flush
  • Pre-compaction memory flush should write to memory/session/<sessionKey>/... by default.
  • Only write to MEMORY.md when confidence + explicit “durable” classification is met.
  1. Metadata + filters on recall
  • Attach {sessionKey, chatType, channel/thread} metadata per chunk.
  • memory_search auto-filters to current session unless includeShared: true.
  1. Memory policy skill (“fence”)
  • A skill that enforces: “remember only in this session unless explicitly promoted.”
  • Add commands like:
  • remember here
  • promote to shared
  • forget from session