gc_retain
Store a fact in the memory bank with automatic routing, deduplication, and supersede support to correct or update previously stored facts.
Instructions
Store a fact in the memory bank. Auto-routes to the best bank by keyword matching, or specify a bank.
Deduplication:
Fingerprint dedup only (exact normalized-content match). Fuzzy/BM25 dedup removed — it was silently rejecting corrections.
Supersedes bypasses even fingerprint dedup — an explicit replacement signal always stores.
Response contract (READ THIS):
{ stored: true, duplicate: false, id, bank } → fact was stored
{ stored: false, duplicate: true, existing_id } → fact was NOT stored; same fingerprint already in DB ALWAYS check 'stored' to know whether your content was persisted. 'ok: true' only means the call succeeded, not that storage happened.
Supersedes + recall: when you pass supersedes: [], the old fact is marked as replaced and won't show up in default recall results. Use recall with include_superseded: true to see historical versions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bank | No | Target bank (auto-routed if omitted) | |
| tags | No | Tags for this fact | |
| origin | No | Origin: 'local' (default), 'hs-import', 'hs-echo' | |
| source | No | Where this fact comes from | |
| content | Yes | The fact to store — be specific and include relevant context | |
| context | No | Category: architecture, decision, pattern, convention, bug, etc. | |
| hindsight | No | Also push to the deep-memory backend | |
| supersedes | No | Fact ID(s) this new fact supersedes. Marks the old fact(s) as replaced (hidden from default recall) AND bypasses fingerprint dedup so your correction is always stored. |