Conceptsv3 featuresPredictive memory

Predictive memory

Stable in docs/STATUS.md. Mnemosyne is alpha, on the 3.6.x line, and the API can still change within 3.x.

Every recall is logged. The anticipation engine mines that log for patterns and answers one question: given what was just recalled, and the time of day, which memories are likely to be needed next?

Four patterns

All four are about facts that were recalled, mined in SQL with no model call.

PatternWhat it findsKept when
SequentialFact B is recalled within five minutes after fact AAt least 5 observations in 30 days, confidence 0.30 or more
PeriodicA fact is recalled in the same weekday and three-hour slot (UTC)Seen in at least 3 different weeks, 20% or more of its recalls
ConditionalThe same query text brings back the same factAt least 4 observations in 30 days, confidence 0.50 or more
Co-occurrenceTwo facts are recalled togetherAt least 2 co-recalls

The first three are materialized views (mv_sequential_patterns, mv_periodic_patterns, mv_conditional_patterns); the fourth reads the co-recall count kept on the relation between two facts. A daily job (mnemo.anticipate.mine, 06:30 UTC) refreshes the views.

The feed

curl "http://localhost:3939/anticipation?recentlyRecalledId=FACT_ID&limit=5" \
  -H "Authorization: Bearer mns_live_..."
ParameterDefaultMeaning
recentlyRecalledIdThe cue for the sequential and co-occurrence patterns
contextA query text, the cue for the conditional pattern
lookAhead30Minutes ahead; shifts the periodic slot
limit20Items to return, up to 100

buildAnticipationFeed in packages/core/src/cognitive/anticipation.ts blends the four signals with fixed weights: sequential 0.35, periodic 0.25, conditional 0.25 and co-occurrence 0.15. A memory found by more than one pattern adds its scores and is marked blended.

{
  "workspaceId": "...",
  "generatedAt": "2026-11-18T09:00:00.000Z",
  "cue": { "recentlyRecalledId": "FACT_ID" },
  "items": [
    {
      "id": "...",
      "score": 0.29,
      "source": "sequential",
      "rationale": "Follows FACT_ID 83% of the time (avg lag 42s)."
    }
  ]
}

The feed returns ids, not content. Fetch a memory with GET /facts/{id}.

The MCP tool is memory_anticipate, with the same four arguments.

Where a model is involved

When the request carries context and an LLM is configured, the server also asks the model for two or three related search queries, runs them through recall and adds their hits to the feed. Without context or without an LLM, the feed is statistical only. A failure of this step returns the statistical feed unchanged.

At session start

POST /session/start runs the feed and stages the top three items, those scoring 0.05 or more, in working memory for 30 minutes. The response lists them in anticipated. When the session collapses, the server compares what was staged with what was recalled and records the accuracy.

A new workspace has an empty recall log, so the feed is empty until recalls accumulate.

See also