Developers

lineage

The chain of edits behind one memory, oldest first. revisions says how much a store moved; this says what happened to one fact.

Supported on Tablet 2 and newer. Read-only. Unlike revisions this is a normal billed call, because it returns memory content.

Pass the id of any memory in the chain. Superseded versions are kept rather than deleted, so a search returning only the current fact can still be traced back.

chain = mem.lineage(memory_id=mid)["chain"]
for step in chain:
    print(step["changed_at"], step["action"], step["content"])
const { chain } = await mem.lineage(undefined, mid);
for (const step of chain) {
  console.log(step.changed_at, step.action, step.content);
}
let r = mem.lineage(None, mid).await?;
for step in r["chain"].as_array().unwrap_or(&vec![]) {
    println!("{} {} {}", step["changed_at"], step["action"], step["content"]);
}
curl -X POST https://api.wontopos.com/api/v1/memory/lineage \
  -H "X-API-Key: $WOS_KEY" -H "Content-Type: application/json" \
  -d '{"user_id":"alice","memory_id":"m_9"}'
200
{ "memory_id": "m_9", "count": 3, "truncated": false,
  "chain": [
    { "memory_id": "m_3", "content": "lives in Seoul",
      "created_at": "2026-03-02T…", "changed_at": "2026-06-11T…",
      "action": "replaced", "confidence": 0.94,
      "superseded_by": "m_7", "is_current": false },
    { "memory_id": "m_7", "content": "moved to Busan",   … },
    { "memory_id": "m_9", "content": "Haeundae, specifically",
      "changed_at": null, "superseded_by": null, "is_current": true }
  ] }
FieldWhat it does
chainThe versions, oldest first. Each carries the same fields a memory does, plus the four below.
changed_atWhen this version was superseded (RFC3339), or null while it is still in force.
actionWhat happened at this link - how the replacement related to this version.
confidenceHow sure the engine was about that relation, 0-1.
is_currentTrue for the one version still in force. Exactly one per chain.
truncatedTrue when the chain was longer than the service walks. The returned steps are still the oldest ones.

What it is for

Two uses. Debugging: why a memory reads the way it does today. And letting an assistant look at its own history - a fact corrected three times is a different kind of fact from one written once, and only the chain shows that.