A Message's Lifecycle in PowerMem: From Ingestion to Forgetting

This article follows one message through PowerMem, an open-source agent memory system from OceanBase, from ingestion to lifecycle management. It explains importance scoring, tier assignment, Ebbinghaus-style decay, access-time decisions, retrieval ranking, and global optimization.

Time leaves dust on memory; access is the only way to wipe it away. When the dust becomes too thick and nobody asks, the memory is forgotten.

🧠 Want to give your AI Agent a memory that actually learns what to keep? PowerMem is OceanBase’s open-source Agent memory layer—explore it at https://github.com/oceanbase/powermem and see how scoring, tiers, and forgetting work in practice.

A message entering an agent memory system is not stored indefinitely with a fixed weight. In PowerMem, the message is scored, assigned to a memory tier, and given retention and review parameters. Later access determines whether it is promoted, archived, or marked for forgetting.

We follow one concrete example from start to finish:

“Review the Q2 requirements document with the product team at 3 p.m. next Friday in Meeting Room 3.”

The sections below show how PowerMem processes this example at each stage.

1. PowerMem importance scoring: is this message worth remembering?

The first question is not “How do we remember this?” but “Is it worth remembering?” Storing every message with equal weight steadily lowers retrieval precision and raises storage cost.

PowerMem scores each message on six weighted dimensions:

Dimension Weight Meaning
relevance 0.30 Relationship to the user’s current context
novelty 0.20 Whether the information is new
emotional_impact 0.15 Emotional intensity
actionable 0.15 Whether the user must act
factual 0.10 Objective, verifiable content
personal 0.10 Connection to the individual user

For our meeting reminder, imagine PowerMem (or an LLM scorer) assigning these sub-scores:

  • relevance 0.8 — it relates to an upcoming work task.
  • novelty 0.5 — Q2 planning may already be on the user’s radar.
  • emotional_impact 0.2 — routine scheduling, not urgent news.
  • actionable 0.9 — the user must show up at a specific time and place.
  • factual 0.8 — time, room, and attendees are concrete.
  • personal 0.6 — work-related but not deeply personal.

The weighted sum:

1
0.30×0.8 + 0.20×0.5 + 0.15×0.2 + 0.15×0.9 + 0.10×0.8 + 0.10×0.6 ≈ 0.72

A score of 0.72 drives the message’s initial tier assignment.

LLM path and rule-engine fallback

When an LLM is available, PowerMem requests structured JSON containing the importance score and six criterion scores. The implementation extracts importance_score through a three-level fallback chain: parse JSON first, match a numeric score with a regular expression second, and use the default value 0.5 if both methods fail. The criterion scores support structured LLM reasoning; they are not directly reweighted by the application.

If the LLM is unavailable, a rule engine provides graceful degradation. It adds points for message length, matching keywords, ? or !, and high or medium priority metadata; the result is capped at 1.0. This keeps ingestion available when the external model is unavailable.

PowerMem six-dimension importance scoring weights for Agent memory retention

2. PowerMem memory tiers and lifecycle parameters

PowerMem maps the cognitive idea of short- and long-term memory to three tiers. Each tier has a strength multiplier; the effective decay parameter is base_decay_rate × multiplier (default base 0.1). In PowerMem’s formula, a larger effective rate means a larger stability S and slower forgetting:

Tier Typical lifetime Strength multiplier Effective rate (base 0.1)
working Hours to one day 0.5 0.05
short_term Days to weeks 1.5 0.15
long_term Weeks to months 2.0 0.20

Promotion rules at ingestion:

  • Scores ≥ 0.8long_term
  • Scores ≥ 0.6short_term
  • Everything else → working

Our meeting reminder scores 0.72, so it lands in short_term. In plain terms: PowerMem treats it like something you need this week—not a lifelong fact, and not a throwaway thought.

PowerMem three-tier memory model spanning working, short-term, and long-term storage

Each memory record stores initial_retention, current_retention, the decay rate, a review schedule, access and review counts, and lifecycle flags such as should_promote, should_forget, should_archive, and is_active. initial_retention preserves the value at creation, while current_retention changes as the memory decays or is reviewed.

PowerMem tier assignment flow with retention fields initialized at ingestion

3. Ebbinghaus-style decay and access-time lifecycle checks

Retention decay model

PowerMem models forgetting with an Ebbinghaus-style exponential curve:

1
R = e^(-t / S)

Where:

  • R — decay factor
  • t — hours elapsed since creation
  • S — characteristic decay time in hours: S = 24 × rate
  • rate — effective decay parameter for the tier (for short_term: 0.1 × 1.5 = 0.15)

For our short_term reminder, rate = 0.15, so S = 3.6 hours. After 3.6 hours, the decay factor is e^(-1) ≈ 37%. At approximately 4.3 hours, it falls below the default forgetting threshold of 0.3. Higher tiers use larger rate values, which increase S and slow decay. If a caller does not supply a tier-specific rate, PowerMem falls back to the global default rate.

PowerMem retention decay curve as access frequency drops over time

What happens on each access

When a memory is accessed through Memory.get() or Memory.search(), PowerMem runs access-time checks:

Action When it applies
forget The decay factor is below 0.3, or the memory has never been accessed and is more than seven days old
promote Access count is at least 3, age exceeds 24 hours, or importance is at least 0.6
archive Age exceeds 30 days or importance is below 0.3
reprocess Access count is a multiple of 5, or the memory tier changes

Promotion moves a memory from working to short_term, or from short_term to long_term. Archiving does not physically delete it; it removes the memory from the active retrieval pool. At each fifth access, or after a tier change, PowerMem recalculates the Ebbinghaus metadata.

Scheduled review

PowerMem creates a review schedule when the memory is created. The global base intervals are 1, 6, 24, 72, and 168 hours. Each interval is compressed according to importance:

1
adjusted_interval = interval × (1 - importance_score × adjustment_factor)

Higher-importance memories receive earlier review times. With an importance score of 0.72 and the default adjustment factor of 0.3, the first 1-hour interval becomes approximately 47 minutes. next_review starts at the first scheduled time; each completed review updates last_reviewed, increments review_count, raises current_retention according to reinforcement_factor, and advances next_review.

PowerMem spaced review schedule with intervals adjusted by importance score

If the memory is not accessed, its decay factor continues to fall. A memory meeting a forgetting condition is marked for removal when the access-time lifecycle check runs.

PowerMem memory eviction lifecycle when retention falls below the threshold

4. Retrieval ranking: final_score = relevance × decay

Retrieval combines semantic similarity with freshness. At search time, PowerMem ranks candidates with:

1
final_score = relevance_score × decay_factor
  • relevance_score — how well the memory matches the query (semantic similarity)
  • decay_factor — current retention R from the Ebbinghaus model

A highly relevant but stale memory can lose to a slightly less relevant but fresher memory. Search itself is also an access path: PowerMem calls Memory.get() for each search result, enabling lifecycle management across the result set.

PowerMem retrieval ranking blends semantic similarity and freshness

5. Global deduplication and compression

Individual messages are only part of the story. PowerMem’s MemoryOptimizer runs globally across the memory store:

  • Exact deduplication — content-hash matching retains the earliest record in each duplicate group and removes the rest; one run processes at most 10,000 records.
  • Semantic deduplication — pairwise embedding cosine similarity identifies near-duplicates. With the default threshold of 0.95, PowerMem removes the newer memory and retains the earlier one.
  • Compression — PowerMem greedily groups memories above the default similarity threshold of 0.85; an LLM summarizes each group into one synthesized memory.

These steps keep the memory layer efficient as conversation volume grows, without waiting for each message to decay on its own.

6. Forgetting is a feature, not a bug

The key design principle is that forgetting is not failure. It is how PowerMem controls noise, latency, and token cost while preserving information that remains useful. An Agent that remembers every casual remark forever will eventually retrieve the wrong context; controlled decay keeps the memory layer sharp.

For our meeting reminder, the lifecycle begins with a score of 0.72 and placement in short_term. Its retention decays from creation; a later access can trigger promotion because its importance is at least 0.6, while forgetting and archiving remain governed by their explicit lifecycle conditions. The design treats forgetting as a controlled quality-management mechanism rather than a failure to retain every message.