Skip to content

Lifecycle Policies

Remem 0.5 uses named lifecycle policies rather than a fixed memory-type switch. The policy controls retention, decay, archiving, and forgetting while the memory remains an ordinary searchable record.

{
"content": "The team moved the service to eu-west-2.",
"policy": "long_term",
"ttl_seconds": 0,
"importance": 0.8
}

Use a short-lived policy with a positive ttl_seconds for temporary context. Use a long-lived policy for preferences, decisions, and facts that should remain available until lifecycle rules or an explicit delete retire them.

  • Retention expires records that have passed their policy window.
  • Decay lowers importance or health as a memory goes unreinforced.
  • Recall records meaningful use and can restore a memory’s lifecycle budget.
  • Promotion moves a memory to a more durable policy when the application decides it matters.
  • Archiving removes a memory from active search while retaining it for history or recovery.
  • Hard deletion removes the record and its derived indexes permanently.

Maintenance runs through durable per-tenant jobs. It continues after a restart, and bounded runs keep large corpora responsive while continuation jobs finish the remaining work.

Keep policy selection close to the meaning of the data:

DataTypical policy
Temporary conversation detailShort retention
User preference or stable factlong_term
Sensitive or compliance-bound contextExplicit retention and audit settings
Protected high-value eventA policy with an appropriate protection window

Policies can be configured per tenant through the administrative API. Changing a policy affects memories as lifecycle maintenance next visits them, so operators should allow the maintenance queue to catch up after a change.