Skip to content

Shared Memory

Varun Pratap Bhardwaj edited this page Jun 19, 2026 · 1 revision

Multi-Scope (Shared) Memory

Status: opt-in feature, added in v3.6.15. Off by default. A fresh or unconfigured install behaves exactly like 3.6.14 — every memory is private to its profile and recall never surfaces another profile's data.

Concepts

Every memory carries a scope:

Scope Who can recall it How to set it
personal (default) only the owning profile nothing — this is the default
shared the owner and the profiles in shared_with --scope shared --shared-with a,b
global every profile on the machine --scope global

Scope is a property of the memory — every atomic fact extracted from a memory inherits the memory's scope.

Recall visibility is controlled separately by two flags, both off by default:

  • include_global — also return global facts from other profiles
  • include_shared — also return facts other profiles shared with you

Personal facts are always returned; the flags only add the shared/global rows.

Enabling it

Per call (CLI)

slm remember "Deploy freeze starts Friday" --scope global
slm remember "Q3 roadmap draft" --scope shared --shared-with alice,bob
slm recall "deploy freeze" --include-global --include-shared
slm recall "private note" --no-global --no-shared

Per call (MCP)

{ "content": "Deploy freeze starts Friday", "scope": "global" }
{ "query": "deploy freeze", "include_global": true, "include_shared": true }

Persistently (config file)

SLM keeps a separate config per mode: mode_a.json, mode_b.json, mode_c.json. Add a scope section to the mode(s) you want:

{
  "mode": "a",
  "scope": {
    "default_scope": "personal",
    "recall_include_global": true,
    "recall_include_shared": true
  }
}

Omitting the scope section keeps the safe defaults (personal / false / false), i.e. 3.6.14 behavior. An invalid value is ignored with a warning — it will not crash the CLI.

Backward compatibility

  • All pre-3.6.15 data is scope='personal' and recall is unchanged.
  • Per-profile isolation is preserved: another profile's personal facts are never visible.
  • Turning the flags on is purely additive — it can only add global/shared rows.
  • Every direct read path (recall, search, list_recent, the slm://recent resource) is private by default; none surface another profile's data unless you opt in.

Known limits (v3.6.15)

  • Cognitive-consolidation (CCQ) summary blocks are always personal for now.
  • A consolidated summary inherits its cluster's scope only when the whole cluster agrees; a mixed-scope cluster yields a personal summary (most restrictive — never leaks).

See also: CLI Commands · MCP Tools · Modes Explained

Clone this wiki locally