You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-16Lines changed: 3 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,20 +72,6 @@ You now have:
72
72
- automatic priming on every prompt
73
73
- everything under `~/.agent-mem/knowledge/` as plain markdown — local, no cloud, no telemetry
74
74
75
-
> **Don't also run `/ultan-install`.** It wires a *second* copy of the hooks into
76
-
> `settings.json`; with the plugin installed, every hook would then fire twice.
77
-
> `/ultan-install` is only for the from-source path — see *Development setup* below.
78
-
79
-
> **Already running Ultan from source?** If you previously ran `/ultan-install`, remove
80
-
> its hooks *before* installing the plugin or every event will be captured twice:
81
-
> open `~/.claude/settings.json` (or the project's `.claude/settings.json` if you used
82
-
> `--project`) and delete every `hooks` entry whose command points into your agent-mem
83
-
> checkout. Stop any manually started daemon too — the plugin's daemon lazy-starts on
84
-
> its own. Your library needs no migration: `~/.agent-mem/` is shared by both setups.
85
-
86
-
> The plugin currently installs from the `main` branch (`@main`) and will move to a
87
-
> tagged release before wider promotion.
88
-
89
75
### Where your memories live
90
76
91
77
Everything Ultan owns lives under **`~/.agent-mem/`** on your local disk — no cloud sync, no hosted database, no telemetry. Override with `AGENT_MEM_HOME=/some/other/path` if you want a different root.
@@ -433,7 +419,7 @@ We don't need to replicate biology exactly. We need the mechanisms to be *presen
| LTD — passive decay of unused weak traces (Ebbinghaus 1885; Wixted 2004; Bear & Malenka 1994) | Half-life on each entry as `f(encoding_strength, reinforced_count)`; only effective for low/moderate strength entries | Partial — fixed 30-day surfacing-aware sweep + archive shipped (PR #7); the `f(encoding_strength, …)` half-life formula awaits the `encoding_strength` field |
435
421
| **Prefrontal inhibition of retrieval** (Anderson & Green 2001 Nature, Think/No-Think paradigm) | **Agent seeing a surfaced memory and not acting on it is functionally a no-think signal.** Counts as weak negative evidence — accelerates decay for low/moderate-strength entries; for high-strength entries it triggers a reconsolidation/update review (relevance-drift, not irrelevance). Asymmetric: "agent explicitly cited / `ultan-search`-fetched" is *strong positive* evidence; "surfaced but ignored" is *weak negative* evidence, requiring multiple instances. Mirrors the brain's asymmetric weighting of presence-of-use vs absence-of-use. | Partial — **positive-use capture shipped** (PR #20): the Librarian judges genuine reliance on a surfaced entry and emits a `used_helpfully` signal; the Scholar deterministically bumps a `fired-helpful` counter on the cited entry, deduped per (session, entry, turn) via a stable seal-time `turn_seq` so a turn re-seen on a later scan never double-counts. **Retrieval-ranking consumption now shipped**: `fired-helpful`/`fired` feeds Tier-1 rank as a gentle, prior-centered usefulness tiebreaker (cold-start-neutral; can't override the reranker's applicability call). The `fired` surface counter is now wired too (incremented per priming surface), supplying the tiebreaker's denominator and the raw material for the negative half. **Still TODO**: feed the signal into *decay resistance* (half-life), and build the negative half ("surfaced but ignored" → weak no-think evidence). |
436
-
|**Reconsolidation** — retrieved memories become labile and are re-stored mutated (Nader et al. 2000; Schiller et al. 2010; Lee et al. 2017; Hupbach et al. 2007) | Librarian gets a `drift` salience signal alongside `contradicts`/`novel`/`reinforces`: *"high-strength entry [[X]] keeps surfacing in contexts that don't quite match its current text — propose an `update`."* Scholar evaluates as a partial mutation, not full replacement. Closest published OSS analog: A-MEM's Zettelkasten evolution (Xu et al., NeurIPS 2025). | Partial — `update` action exists; drift-driven proposal pathway does not |
422
+
| **Reconsolidation** — retrieved memories become labile and are re-stored mutated, which both updates *and* distorts (Nader et al. 2000; Schiller et al. 2010; Lee et al. 2017; Hupbach et al. 2007; **Bridge & Paller 2012** — every retrieval is a partial re-write that measurably *distorts*) | Librarian has a `drift` salience signal alongside `contradicts`/`novel`/`reinforces`. **Trigger is retrieval-into-use**: when an entry surfaces and is genuinely *used* this turn (the same Tier-2 / `used_helpfully` moment), the Librarian may propose an `update_entry` that folds a new qualifier from the use-context into the entry *or* compresses/sharpens it. Three guardrails keep mutation from becoming distortion (the Bridge & Paller failure mode): (1) **split-on-sprawl** — size is managed structurally, not by a per-entry char cap: when integrating new nuance would make an entry cover more than one claim, the Librarian (whose job is reorg) splits it — trims the original and spins the new material into its own linked entry — rather than letting reconsolidation balloon one file; (2) **claim-preservation gate** — the Scholar diffs old-vs-new and vetoes any change that weakens the load-bearing claim or is mere churn; (3) a **`reconsolidated` counter** (+ `last_reconsolidated`) tracks cumulative mutation so the Scholar tightens on much-churned entries. Scholar evaluates as a partial mutation, not full replacement. Closest published OSS analog: A-MEM's Zettelkasten evolution (Xu et al., NeurIPS 2025). | **Done** — `drift` signal + retrieval-into-use proposal pathway + claim-preservation gate + split-on-sprawl curation + `reconsolidated` counter shipped. **Still TODO**: the ambient-drift trigger (high-`reinforced` entry whose *surfacing* contexts drift even without an explicit use); a re-reconsolidation cooldown; and an optional deterministic size→split backstop if curator judgement proves unreliable |
437
423
| Sleep-based selective consolidation (Diekelmann & Born 2010; Stickgold 2005; Wilhelm et al. 2011) | The Scholar's batch reconciliation phase plays this role architecturally — periodic, deliberate, prioritises high-salience entries; no behavioural analog of replay yet | Partial |
438
424
|**Reflective abstraction — offline integration of leaf episodes into higher-order rules** (van Kesteren et al. 2012; Jung-Beeman et al. 2004; Kizilirmak et al. 2016; Schlichting & Preston 2015; Tse et al. 2007; Behrens et al. 2018; Preston & Eichenbaum 2013; Eichenbaum 2017; LLM analog: Park et al. 2023 Generative Agents reflection) |`abstract_entries` Librarian action proposes a parent abstraction over ≥2 related leaves during its normal scan — agent judgment, not cosine clustering. Surprise-/aha-gated (remote children + predictive lift + non-obvious + compresses) on both the Librarian propose-side and Scholar veto-side; the Scholar approves or vetoes; on approve, the executor writes the parent (`type: abstraction`) with `[[wikilink]]` backlinks into each child, which stay in place. See *Reflective abstraction* above. |**Done (slice 1)** — encoding_strength-derived parent durability awaits the `encoding_strength` field; ships on the existing `reinforced`/decay lifecycle |
439
425
| Rational analysis of memory — retention tracks environmental utility (Anderson & Schooler 1991) | The whole loop is enacting this if encoding-strength + decay + use-tracking work together. The Anderson & Schooler framing is the cleanest theoretical anchor for the system as a whole. | Emergent if the rest lands |
@@ -445,7 +431,7 @@ We don't need to replicate biology exactly. We need the mechanisms to be *presen
445
431
**Open implementation questions:**
446
432
447
433
- What concrete signal does Ultan use to detect "surfaced but ignored"? Candidates: entry appeared in `additionalContext` priming N times in last K days *and* was never `ultan-search`-fetched *and* doesn't appear (as wikilink or paraphrase) in the agent's outputs in those sessions. Likely needs a lightweight surfaced-vs-used log alongside `runs/`.
448
-
- How does the Librarian detect drift for the reconsolidation pathway? Probably: high-`reinforced` entry whose recent surfacing contexts have low text-similarity to the entry itself — i.e. the entry is being surfaced for the right reasons by BM25/embeddings but the *frame* around it keeps shifting.
434
+
- How does the Librarian detect drift for the reconsolidation pathway? **Resolved for the use-triggered case** (shipped): the labile window opens when an entry is genuinely *used* this turn (the `used_helpfully` / Tier-2 moment), and the Librarian checks whether the use-context adds a qualifier worth integrating or the entry can be compressed. Still open: the *ambient* case — high-`reinforced` entry whose recent surfacing contexts have low text-similarity to the entry itself (surfaced for the right reasons by BM25/embeddings but the *frame* around it keeps shifting), with no explicit use to anchor the window.
449
435
450
436
Prior art worth borrowing from: **MemoryBank** (Zhong et al., 2024) applies the Ebbinghaus curve to retrieval weighting; **FadeMem** (2025) does biologically-inspired decay end-to-end. Neither (as far as we've seen) couples decay with surprise-calibrated encoding strength + a prefrontal-inhibition analog + a reconsolidation pathway. That combination is the contribution.
451
437
@@ -468,6 +454,7 @@ Prior art worth borrowing from: **MemoryBank** (Zhong et al., 2024) applies the
468
454
- Diekelmann, S. & Born, J. (2010). *The memory function of sleep.* Nature Reviews Neuroscience, 11(2), 114–126.
469
455
- Schiller, D., Monfils, M.-H., Raio, C.M., Johnson, D.C., LeDoux, J.E. & Phelps, E.A. (2010). *Preventing the return of fear in humans using reconsolidation update mechanisms.* Nature, 463(7277), 49–53.
470
456
- Wilhelm, I., Diekelmann, S., Molzow, I., Ayoub, A., Mölle, M. & Born, J. (2011). *Sleep selectively enhances memory expected to be of future relevance.* Journal of Neuroscience, 31(5), 1563–1569.
457
+
- Bridge, D.J. & Paller, K.A. (2012). *Neural correlates of reactivation and retrieval-induced distortion.* Journal of Neuroscience, 32(35), 12144–12151. (Retrieval reactivates a memory into a labile state and measurably *distorts* it on re-storage — the failure mode the reconsolidation guardrails defend against.)
471
458
- Hardt, O., Nader, K. & Nadel, L. (2013). *Decay happens: the role of active forgetting in memory.* Trends in Cognitive Sciences, 17(3), 111–120.
472
459
- Nørby, S. (2015). *Why forget? On the adaptive value of memory loss.* Perspectives on Psychological Science, 10(5), 551–578.
473
460
- Greve, A., Cooper, E., Kaula, A., Anderson, M.C. & Henson, R. (2017). *Does prediction error drive one-shot declarative learning?* Journal of Memory and Language, 94, 149–165.
0 commit comments