Provenance chains
Every memory carries derived_from and supersedes edges to its ancestors. memledger walks the chain on search() to compute weakest-link effective confidence and surfaces the chain in the audit trail.
The chain is what enables memledger's most opinionated guarantee: a high-confidence claim built on a low-confidence ancestor cannot outscore its weakest link.
# Triage agent makes a hedged guess
triage_id = await ml.add(
content="possible connection-pool exhaustion",
confidence=0.30,
hedged=True,
created_by="triage-agent",
)
# Diagnosis agent confidently asserts a fix derived from triage
await ml.add(
content="bump maxPoolSize from 10 to 50",
confidence=0.85,
created_by="diagnosis-agent",
derived_from=[triage_id], # this is the chain
)
When the diagnosis record is later retrieved, its effective confidence is min(0.85, 0.30) = 0.30 — the chain is honest about the weakest upstream link.
For the conceptual framing — including the DAG semantics and the JsonArrayChainStore vs Neo4jChainStore trade-off — see Provenance chain.
The full configuration reference — max_hops tuning, ChainStore Protocol implementation — ships in a future release.