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:

GroupKindsCreated by
Lifecycle / mechanismsupersedes, transition, corrects, derived_from, supportsMinted by the store on write / sweep
Strong factualcauses, caused_by, part_of, precedes, follows, enables, blocks, co_constrains, located_at, uses, works_on, contrasts_with, contradicts, relates_toProposed by the relationship extractor (LLM)
Thematicsame_topicLow-strength, capped, rendered separately
LegacyrelatesGeneric 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.

MemoryLink
{  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 subjectKey slot archives the prior and wires contradicts + transition edges; an explicit supersedes is mirrored as a supersedes edge 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

v1 stores and derives edges (the substrate) and exposes the one-hop read primitives. Multi-hop graph traversal during recall — following edges to pull in related context, with spreading activation and degree normalization — is deliberately a v2 step. The field and primitives land now so the data accrues and the v2 walk has something to walk.

In the code

Edge kinds and read primitives are src/agents/memory/links.ts; the auto-minting on slot supersession is in records.ts.