Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Relationship

Generated artifact. This page is generated from schemas/Relationship.schema.json and schemas/common.schema.json. Do not hand-edit; regenerate from the schema and the field tables will stay authoritative.

A directed, weighted edge between two Entity resources. Strength is dynamic (Hebbian): it increases with co-activation and decays without use.

Maturity: OMM-3

Purpose

A Relationship is a typed graph edge linking two entities. Its strength carries Hebbian synaptic weight, and validAt / invalidatedAt give it a temporal lifecycle so superseded edges can be retained rather than deleted.

See Memory Semantics §4 for how strength rises with co-activation and decays with disuse.

Fields

FieldTypeCard.Description
resourceType"Relationship" (const)1..1Discriminator. MUST be Relationship.
idId (string)1..1Resource-local identifier, unique among Relationship resources within a Bundle. Pattern ^[A-Za-z0-9._:-]{1,128}$.
fromReference1..1Source Entity reference, e.g. { "ref": "Entity/john" }.
toReference1..1Target Entity reference.
relationTypestring (open vocabulary)1..1Edge type. Common values below. Implementations MAY mint new lowercase snake_case values.
metaMeta0..1Metadata envelope (omirVersion, profile[], source, createdAt, lastUpdated, maturity).
strengthUnitInterval ([0,1])0..1Synaptic weight. Dynamic under Hebbian plasticity.
contextstring0..1Free-text note describing the relationship.
createdAtInstant (date-time)0..1When the edge was first recorded.
validAtInstant (date-time)0..1When this relationship was last observed to hold (temporal tracking).
invalidatedAtInstant (date-time)0..1When this relationship was invalidated, if ever (temporal edge invalidation).
sourceEpisodeReference0..1Episode reference that produced this relationship.
extensionarray of Extension0..*Typed, namespaced extensions carrying implementation-specific data without breaking core conformance.

additionalProperties is false: a conformant Relationship carries only the fields above.

Reference constraint. A Reference.ref matches ^(MemoryRecord|Entity|Relationship|Episode)/…. By convention from and to point to Entity resources and sourceEpisode points to an Episode; the schema’s Reference shape does not itself narrow the target type, so producers MUST honor these conventions.

relationType common values

works_with, works_at, employed_by, part_of, contains, owned_by, located_in, located_at, related_to. The vocabulary is open.

Minimal

The required set is resourceType, id, from, to, relationType.

{
  "resourceType": "Relationship",
  "id": "rel-varun-omir",
  "from": { "ref": "Entity/varun" },
  "to": { "ref": "Entity/omir" },
  "relationType": "maintains"
}

Full

{
  "resourceType": "Relationship",
  "id": "rel-varun-omir",
  "meta": {
    "omirVersion": "R1",
    "source": "veld/0.7.6",
    "maturity": 3
  },
  "from": { "ref": "Entity/varun" },
  "to": { "ref": "Entity/omir" },
  "relationType": "maintains",
  "strength": 0.88,
  "context": "Convenes the OMIR working group.",
  "createdAt": "2026-05-30T10:05:00Z",
  "validAt": "2026-05-30T11:42:00Z",
  "invalidatedAt": null,
  "sourceEpisode": { "ref": "Episode/ep-launch-chat" },
  "extension": [
    {
      "url": "https://veld.dev/omir/ext/hebbian",
      "valueJson": { "coActivations": 17, "lastStrengthened": "2026-05-30T11:42:00Z" }
    }
  ]
}

The null for invalidatedAt above is illustrative of an edge still in force; producers SHOULD simply omit the field when an edge has not been invalidated.

References

A Relationship points to other resources by typed Reference (ResourceType/id):

  • fromEntity — the source endpoint of the edge.
  • toEntity — the target endpoint of the edge.
  • sourceEpisodeEpisode — the episode that produced this relationship.

No Relationship field references MemoryRecord or Bundle.