Skip to content

Relationship Types

MIF provides an extensible relationship type system. Implementations SHOULD support the core types for interoperability, but MAY define custom relationship types for domain-specific needs.

Relationship types are not hard-coded. They are defined in vault configuration and can be extended per-project:

.mif/config.yaml
relationship_types:
# Core types (RECOMMENDED for interoperability)
- name: RelatesTo
description: General semantic relationship
symmetric: true
- name: DerivedFrom
description: Memory created based on source
inverse: Derives
- name: Supersedes
description: Replaces an older memory
inverse: SupersededBy
- name: ConflictsWith
description: Contradicts another memory
symmetric: true
- name: PartOf
description: Component of a larger whole
inverse: Contains
- name: Implements
description: Realizes a concept or pattern
inverse: ImplementedBy
- name: Uses
description: Utilizes a technology or tool
inverse: UsedBy
- name: Created
description: Authored by an entity
inverse: CreatedBy
- name: MentionedIn
description: Referenced within a memory
inverse: Mentions
# Custom types (domain-specific)
- name: Reinforces
namespace: subcog
description: Strengthens confidence in another memory
inverse: ReinforcedBy
- name: Contradicts
namespace: subcog
description: Provides evidence against another memory
inverse: ContradictedBy
- name: BreedsWith
namespace: farm
description: Animal breeding relationship
symmetric: false
properties:
- name: breeding_date
type: date
- name: success
type: boolean

For maximum interoperability, implementations SHOULD recognize these nine core types:

TypeDescriptionInverseSymmetric
RelatesToGeneral relationshipRelatesToYes
DerivedFromCreated based on sourceDerivesNo
SupersedesReplaces older memorySupersededByNo
ConflictsWithContradicts another memoryConflictsWithYes
PartOfComponent of larger wholeContainsNo
ImplementsRealizes a concept/patternImplementedByNo
UsesUtilizes a technology/toolUsedByNo
CreatedAuthored by entityCreatedByNo
MentionedInReferenced in memoryMentionsNo

Providers MAY define additional relationship types using namespaced URIs:

# Custom relationship type definition
relationship_types:
- name: Contradicts
namespace: farm # Results in URI: farm:Contradicts
description: Provides conflicting evidence
inverse: ContradictedBy
properties:
- name: contradiction_type
type: string
enum: [direct, indirect, partial]
- name: severity
type: decimal
range: [0.0, 1.0]

JSON-LD representation of custom relationship types:

{
"@context": [
"https://mif-spec.dev/schema/context.jsonld",
{"farm": "https://example.org/farm/"}
],
"relationships": [
{
"@type": "Relationship",
"relationshipType": "farm:BreedsWith",
"target": {"@id": "urn:mif:entity:animal:ram-001"},
"strength": 1.0,
"farm:breeding_date": "2025-10-15",
"farm:success": true
}
]
}

Markdown syntax:

Relationships use a simple type [[target]] format in a dedicated section:

## Relationships
- relates-to [[Other Memory]]
- derived-from [[Source Memory]]
- supersedes [[Old Memory]]
- conflicts-with [[Contradicting Memory]]
- part-of [[Parent Memory]]

The relationship type name is converted to kebab-case in Markdown. The target uses wiki-link syntax [[]] which resolves to the memory’s @id or title.

JSON-LD schema:

"relationships": [
{
"@type": "Relationship",
"relationshipType": "DerivedFrom",
"target": {"@id": "urn:mif:memory:source-memory"},
"strength": 0.9,
"metadata": {
"reason": "Extracted key insight",
"extractedAt": "2026-01-15T10:30:00Z"
}
}
]
PropertyTypeRequiredDescription
@typeStringYesAlways "Relationship"
relationshipTypeURI/VocabYesType identifier (core or custom)
targetURI ReferenceYesTarget memory or entity URI
strengthDecimalNoRelationship strength (0.0-1.0)
metadataObjectNoAdditional relationship metadata