Tideline
The link graph
Facts in Tideline are not islands. Each record can carry typed edges to other records, so the store knows when one fact supersedes, corrects, contradicts, causes, or relates to another. This is what turns a pile of facts into a memory graph.
Edge kinds#
The edge types fall into four groups by how they come to exist:
| Group | Kinds | Created by |
|---|---|---|
| Lifecycle / mechanism | supersedes, transition, corrects, derived_from, supports | Minted by the store on write / sweep |
| Strong factual | causes, caused_by, part_of, precedes, follows, enables, blocks, co_constrains, located_at, uses, works_on, contrasts_with, contradicts, relates_to | Proposed by the relationship extractor (LLM) |
| Thematic | same_topic | Low-strength, capped, rendered separately |
| Legacy | relates | Generic association (older edges) |
An edge carries its kind and target memoryId, plus an optional one-line reason (the model's justification, for explainable rendering) and a strength of 1–5. Weak factual edges are dropped at extraction time; same_topic is admitted only at low strength and capped.
{ kind: "causes" | "part_of" | "supersedes" | "contradicts" | ..., target: string, // memoryId of the linked fact reason?: string, // one-line "why", for explainable rendering strength?: number, // 1..5 (factual edges below threshold are dropped)}Who creates edges#
- The store mints lifecycle edges automatically. Writing a new value to a
subjectKeyslot archives the prior and wirescontradicts+transitionedges; an explicitsupersedesis mirrored as asupersedesedge at read time (so a graph view is complete without a double-write). - The relationship extractor (an LLM pass) proposes the strong factual edges, each requiring a stated basis, a reason, and a strength. It runs as part of the off-hot-path maintenance, never on the turn's critical path.
Reading the graph#
v1 ships the read primitives that walk a single hop:
linksFrom(record)— every outbound edge (explicit links plus mirrored supersedes, deduped).backlinksTo(records, id)— every inbound edge across the corpus.inspect(memoryId)— a fact with its outbound links and inbound backlinks, for diagnostics.
contradicts edges flag conflicts for the consolidation pass — they are surfaced for review, not auto-resolved.
v1 stores; v2 walks
In the code
Edge kinds and read primitives are src/agents/memory/links.ts; the auto-minting on slot supersession is in records.ts.