Skip to content

Data Model

A Memory Unit is the atomic element of MIF. It contains:

PropertyRequiredTypeDescription
idREQUIREDUUIDGlobally unique identifier
contentREQUIREDStringThe memory content (Markdown)
typeREQUIREDEnumMemory classification (see below)
createdREQUIREDDateTimeWhen the memory was created
modifiedRECOMMENDEDDateTimeWhen last modified
ontologyRECOMMENDEDObjectReference to applied ontology
namespaceRECOMMENDEDStringHierarchical scope
tagsOPTIONALArrayClassification tags
entitiesOPTIONALArrayReferenced entities
relationshipsOPTIONALArrayTyped relationships
temporalOPTIONALObjectTemporal validity data
provenanceOPTIONALObjectSource and trust data
embeddingOPTIONALObjectEmbedding reference
citationsOPTIONALArrayCitation references (Level 3)
summaryOPTIONALStringCompressed content summary (Level 3)
compressed_atOPTIONALDateTimeWhen compression was applied (Level 3)
extensionsOPTIONALObjectProvider-specific data

MIF uses three base memory types, reflecting how human memory systems organize information:

TypeDescriptionNamespace Hint
semanticFacts, concepts, relationships, and knowledgesemantic/*
episodicEvents, experiences, sessions, and timelinesepisodic/*
proceduralStep-by-step processes, runbooks, and patternsprocedural/*

Base Type Descriptions:

  • Semantic: Declarative knowledge about the world—facts, concepts, decisions, preferences, and relationships between entities. Examples: architectural decisions, technology choices, user preferences, domain knowledge.

  • Episodic: Time-bound experiences and events—incidents, conversations, sessions, and blockers. These memories have strong temporal context and represent “what happened.”

  • Procedural: How-to knowledge—runbooks, migration guides, code patterns, and step-by-step processes. These memories describe “how to do” something.

Ontologies MAY define extended types using namespace prefixes:

# In ontology definition
entity_types:
- name: decision
base: semantic
description: "Architectural or design decision"
- name: runbook
base: procedural
description: "Step-by-step operational guide"
- name: incident
base: episodic
description: "Production incident record"

When using ontology-extended types, the type field uses the base type, while specific categorization is expressed through the namespace:

---
type: semantic
namespace: _semantic/decisions
ontology:
id: mif-base
---

This allows ontologies to define rich taxonomies while maintaining interoperability through the base type foundation.

A Memory Unit MAY declare which ontology it conforms to using the ontology field:

PropertyRequiredTypeDescription
idREQUIREDStringOntology identifier (matches ontology.id in ontology definition)
versionOPTIONALStringSemantic version (e.g., “1.0.0”)
uriOPTIONALURIURL to the ontology definition file

Example:

ontology:
id: regenerative-agriculture
version: "1.0.0"
uri: https://github.com/zircote/MIF/ontologies/examples/regenerative-agriculture.ontology.yaml

The ontology.id MUST match the ontology.id field in the referenced ontology definition file. This enables:

  • Validation that namespace paths conform to the ontology’s defined namespaces
  • Discovery pattern matching for entity type suggestions
  • Schema validation for entity-specific fields