An open standard for portable AI memory representation.
MIF is a proposed standard that aims to enable interoperability between AI memory providers by defining a common data model with dual representations:
- Markdown (
.memory.md) - Human-readable, Obsidian-compatible - JSON-LD (
.memory.json) - Machine-processable, semantically linked
The AI memory ecosystem is fragmented. Mem0, Zep, Letta, LangMem, Subcog, and others all use proprietary schemas. MIF solves:
- Vendor lock-in - Move memories between providers
- Data ownership - Local-first, plain text files
- Interoperability - Common vocabulary for relationships and entities
- Future-proofing - Standard formats survive provider discontinuation
---
id: 550e8400-e29b-41d4-a716-446655440000
type: semantic
created: 2026-01-15T10:30:00Z
namespace: _semantic/preferences
---
User prefers dark mode for all applications.{
"@context": "https://raw.githubusercontent.com/zircote/MIF/main/schema/context.jsonld",
"@type": "Memory",
"@id": "urn:mif:550e8400-e29b-41d4-a716-446655440000",
"memoryType": "semantic",
"namespace": "_semantic/preferences",
"content": "User prefers dark mode for all applications.",
"created": "2026-01-15T10:30:00Z"
}| Feature | Description |
|---|---|
| Dual Format | Markdown AND JSON-LD representations |
| Obsidian Native | Valid Obsidian notes with wiki-links |
| Typed Relationships | 9 core relationship types (RelatesTo, DerivedFrom, Supersedes, etc.) |
| Entity Types | Person, Organization, Technology, Concept, File |
| Bi-Temporal | Track when recorded AND when facts are valid |
| Flexible Namespaces | _public, _shared, {org}/{scope}+ with reserved prefixes |
| Model-Agnostic Embeddings | Store model + source text for re-embedding |
| Citations | Structured references with type/role taxonomy (Level 3) |
| W3C PROV | Standard provenance tracking |
| JSON Schema | Automated validation for MIF documents |
| Ontology System | Three-type hierarchy with domain extensions |
MIF includes an ontology system for organizing memories into three base types:
semantic/ # Facts, concepts, relationships
├── decisions/ # Architectural choices, rationale
├── knowledge/ # APIs, context, learnings, security
└── entities/ # Entity definitions
episodic/ # Events, experiences, timelines
├── incidents/ # Production issues, postmortems
├── sessions/ # Debug sessions, work sessions
└── blockers/ # Impediments, issues
procedural/ # Step-by-step processes
├── runbooks/ # Operational procedures
├── patterns/ # Code conventions, testing
└── migrations/ # Migration steps, upgrades
- Hierarchical namespaces - Cognitive memory types with sub-namespaces
- Entity types - Define custom entities with traits and schemas
- Discovery patterns - Auto-detect capture opportunities from content
- JSON-LD export - Semantic web compatibility via
yaml2jsonld.py - Extensible - Domain-specific ontologies extend the base
See ontologies/ for base ontology and examples.
See SPECIFICATION.md for the complete technical specification.
JSON Schema files are available for automated validation:
# Validate a MIF document
npx ajv validate -s schema/mif.schema.json -d your-memory.json
# Validate citations only
npx ajv validate -s schema/citation.schema.json -d citation.json
# Validate ontology definitions
npx ajv validate -s schema/ontology/ontology.schema.json -d ontology.yamlConvert YAML ontologies to JSON-LD for semantic web compatibility:
python scripts/yaml2jsonld.py ontologies/mif-base.ontology.yaml
python scripts/yaml2jsonld.py --all # Convert all ontologiesSee the examples/ directory for:
- Minimal memories (Level 1)
- Standard memories with relationships (Level 2)
- Full-featured memories with temporal, provenance, and citations (Level 3)
| Level | Requirements |
|---|---|
| Level 1: Core | id, type, content, created |
| Level 2: Standard | + namespace, entities, relationships, timestamps |
| Level 3: Full | + bi-temporal, decay, provenance, embeddings, citations |
MIF includes migration guides for:
- Mem0
- Zep
- Letta (Agent File)
- Subcog
- Basic Memory
This specification is open source. Contributions welcome:
- Open an issue for discussion
- Submit PRs for specification changes
- Implement and share converters