MEMORY-LD v0.1.0
The functional LD profile for persistent knowledge organization — extending CORE-LD with memory semantics for representing knowledge stores, memories, episodes, retrieval, and forgetting.Status: Draft Extends: CORE-LD v0.1.0 Constitutional dependencies: URS v0.1.0 → CORE-LD v0.1.0 Spec family: Functional Profile (see CORE-LD §6.1 — Composition Rules) Dimension registry prefix: MEMORY-LD Canonical @context: https://specs.initialcore.net/ns/memory-ld.jsonld
1. Preamble
MEMORY-LD is the functional profile for persistent knowledge organization. It defines how knowledge stores, memories, episodes, retrieval operations, and forgetting are expressed as CORE-LD entities with standardised memory semantics.
What MEMORY-LD is:
- A set of entity types and properties specialised for representing persistent knowledge
- A memory model: what is stored (episodes, facts, concepts), how it is organised (stores, indices, schemas), how it is retrieved (queries, recall), and how it evolves (consolidation, forgetting)
- A standard envelope for any system that maintains structured long-term knowledge
What MEMORY-LD is not:
- Not a database specification — MEMORY-LD defines the representation, not the engine
- Not a vector store format — embeddings are parameters, not entity types
- Not a replacement for CORE-LD — MEMORY-LD inherits all CORE-LD invariants and adds its own
1.1 Composition rule
MEMORY-LD = CORE-LD + MemoryStore + Episode + KnowledgeAtom + Schema + RetrievalSpec + ForgettingPolicy
Any conforming MEMORY-LD implementation MUST also conform to CORE-LD at the same conformance level. An encoded MEMORY-LD binding MUST preserve both CORE-LD and MEMORY-LD invariants.
1.2 Memory as a functional complement
MEMORY-LD is the complement to INPUT-LD in the functional profile family:
| Aspect | INPUT-LD | MEMORY-LD |
|---|---|---|
| Direction | Inbound (request → system) | Internal (system persists knowledge) |
| Lifetime | Transient (request-response) | Persistent (crosses sessions) |
| Structure | Imperative (intent + parameters) | Declarative (facts + episodes) |
| Mutation | Mutate request | Consolidation / forgetting |
INPUT-LD answers "what does the system need to process?" MEMORY-LD answers "what does the system need to remember?"
2. Entity Types
MEMORY-LD extends the CORE-LD kind set with the following entity types:
2.1 MemoryStore
A MemoryStore represents a managed collection of persistent knowledge — the top-level container for memories.
{
"@context": "https://specs.initialcore.net/ns/memory-ld.jsonld",
"@id": "_:store1",
"@type": "MemoryStore",
"name": "ICoreConstitutionalMemory",
"storeType": "episodic",
"schema": "_:schema1",
"indexes": [ "_:idx1", "_:idx2" ],
"policy": "_:policy1"
}
Registered store types:
| Type | Semantics | Example use |
|---|---|---|
| `episodic` | Sequential experience records | Session logs, interaction history |
| `semantic` | General factual knowledge | Entity definitions, relationship facts |
| `procedural` | How-to knowledge | Workflows, rules, skill definitions |
| `associative` | Link-based relational memory | Graph of related concepts |
| `working` | Short-term, task-scoped memory | Current context, scratchpad |
| Property | Type | Required | Description |
|---|---|---|---|
| `storeType` | String | Yes | Type of memory store |
| `schema` | Entity ref | No | Reference to a Schema defining valid memory structures |
| `indexes` | Array of Entity ref | No | References to Index entities |
| `policy` | Entity ref | No | Reference to a ForgettingPolicy |
| `capacity` | Integer | No | Maximum number of items (0 = unlimited) |
2.2 Episode
An Episode represents a single recorded experience or event — a unit of episodic memory.
{
"@id": "_:ep1",
"@type": "Episode",
"timestamp": "2026-07-30T14:00:00Z",
"duration": 2.5,
"summary": "User requested memory profile creation",
"content": "_:context1",
"associations": [ "_:entity1", "_:entity2" ],
"salience": 0.85
}
| Property | Type | Required | Description |
|---|---|---|---|
| `timestamp` | ISO 8601 | Yes | When the episode occurred |
| `duration` | Number | No | Duration in seconds |
| `summary` | String | No | Human-readable summary |
| `content` | Entity ref | No | The data or entities comprising the episode |
| `associations` | Array of Entity ref | No | Related entities for associative recall |
| `salience` | Number [0,1] | No | Importance weighting for retention |
2.3 KnowledgeAtom
A KnowledgeAtom represents a single atomic fact or proposition — a unit of semantic memory.
{
"@id": "_:ka1",
"@type": "KnowledgeAtom",
"subject": "_:entity1",
"predicate": "hasProvenance",
"object": "did:icore:admin",
"confidence": 0.95,
"source": "_:ep1"
}
| Property | Type | Required | Description |
|---|---|---|---|
| `subject` | Entity ref or IRI | Yes | The entity this fact is about |
| `predicate` | String | Yes | The relationship or property |
| `object` | Any | Yes | The value or reference the fact asserts |
| `confidence` | Number [0,1] | No | Certainty of the knowledge (default 1.0) |
| `source` | Entity ref | No | Episode or entity from which this fact was derived |
KnowledgeAtoms are composable: multiple atoms about the same subject with the same predicate constitute alternative or corroborating knowledge (distinguished by source and confidence).
2.4 Schema
A Schema defines the valid structure of memories within a MemoryStore — an ontology for memory organization.
{
"@id": "_:schema1",
"@type": "Schema",
"name": "ConstitutionalEntitySchema",
"entityTypes": [ "Entity", "Identifier", "Provenance" ],
"requiredProperties": [ "name", "identifier" ],
"forbiddenProperties": [],
"validators": [
{
"field": "identifier.scope",
"operator": "in",
"value": ["local", "constitutional"]
}
]
}
| Property | Type | Required | Description |
|---|---|---|---|
| `entityTypes` | Array of String | No | Allowed entity type names |
| `requiredProperties` | Array of String | No | Properties that must be present |
| `forbiddenProperties` | Array of String | No | Properties that must not be present |
| `validators` | Array of Validator | No | Constraint expressions for validation |
2.5 Index
An Index provides an access structure for efficient retrieval.
{
"@id": "_:idx1",
"@type": "Index",
"name": "byActor",
"indexType": "hash",
"field": "actor",
"unique": false
}
Registered index types:
| Type | Meaning |
|---|---|
| `hash` | Direct lookup by exact match |
| `ordered` | Range-scannable ordered index |
| `vector` | Embedding-based similarity index |
| `graph` | Traversal-optimised adjacency index |
2.6 RetrievalSpec
A RetrievalSpec describes a memory retrieval operation — what to find, how to rank, what to return.
{
"@id": "_:ret1",
"@type": "RetrievalSpec",
"query": {
"field": "predicate",
"operator": "equals",
"value": "hasProvenance"
},
"ranking": "relevance",
"maxResults": 10,
"includeAssociations": true
}
| Property | Type | Required | Description |
|---|---|---|---|
| `query` | QueryExpression | Yes | The retrieval predicate |
| `ranking` | String | No | Ranking strategy: `relevance`, `recency`, `salience`, `confidence` |
| `maxResults` | Integer | No | Maximum items to return |
| `includeAssociations` | Boolean | No | Whether to retrieve linked memories |
QueryExpression:
{
"field": "...",
"operator": "equals | contains | matches | exists",
"value": "..."
}
2.7 ForgettingPolicy
A ForgettingPolicy defines when and how memories are consolidated, archived, or pruned.
{
"@id": "_:policy1",
"@type": "ForgettingPolicy",
"retentionDuration": "P90D",
"salienceThreshold": 0.3,
"consolidationStrategy": "summarize",
"maxEpisodes": 10000
}
| Property | Type | Required | Description |
|---|---|---|---|
| `retentionDuration` | ISO 8601 Duration | No | How long before automatic review |
| `salienceThreshold` | Number [0,1] | No | Below this, memory becomes archival |
| `consolidationStrategy` | String | No | `summarize`, `prune`, `archive`, `merge` |
| `maxEpisodes` | Integer | No | Hard limit on episode count |
3. Memory Lifecycle
A memory progresses through a lifecycle from acquisition through potential forgetting.
Acquired → Indexed → Consolidated → Archived → Forgotten
| State | Meaning |
|---|---|
| `Acquired` | Memory first recorded |
| `Indexed` | Memory stored with retrieval structures |
| `Consolidated` | Merged, summarised, or linked to related memories |
| `Archived` | Retained but not in active retrieval set |
| `Forgotten` | Removed or pruned per policy |
A memory may also be Recalled (temporarily promoted from Archived to active) without changing its lifecycle state.
4. Invariants
MEMORY-LD inherits all 23 CORE-LD invariants (I1–I23). The following MEMORY-LD-specific invariants are ADDITIONAL:
4.1 Store invariants (I-MEM-1 through I-MEM-4)
| ID | Invariant | Check |
|---|---|---|
| I-MEM-1 | Every MemoryStore has a storeType | `storeType` present and non-empty |
| I-MEM-2 | Store type is registered | `storeType` ∈ {episodic, semantic, procedural, associative, working} |
| I-MEM-3 | MemoryStore references are resolvable | `schema`, `indexes`, `policy` refs resolve in the graph |
| I-MEM-4 | MemoryStore capacity is non-negative | `capacity` is absent or ≥ 0 |
4.2 Episode invariants (I-MEM-5 through I-MEM-8)
| ID | Invariant | Check |
|---|---|---|
| I-MEM-5 | Every Episode has a timestamp | `timestamp` present and valid ISO 8601 |
| I-MEM-6 | Episode associations are resolvable | Every `associations` entry resolves to an entity in the graph |
| I-MEM-7 | Episode salience is in [0,1] | `salience` absent (defaults to 0.5) or in [0,1] |
| I-MEM-8 | Episode content is a CORE-LD entity | `content` ref resolves to an entity with valid `@type` |
4.3 KnowledgeAtom invariants (I-MEM-9 through I-MEM-12)
| ID | Invariant | Check |
|---|---|---|
| I-MEM-9 | Every KnowledgeAtom has subject, predicate, object | All three present |
| I-MEM-10 | KnowledgeAtom confidence is in [0,1] | `confidence` absent (defaults to 1.0) or in [0,1] |
| I-MEM-11 | KnowledgeAtom source is resolvable | `source` ref resolves in the graph |
| I-MEM-12 | Predicate is a defined term | `predicate` resolves through the active @context |
4.4 Retrieval invariants (I-MEM-13 through I-MEM-15)
| ID | Invariant | Check |
|---|---|---|
| I-MEM-13 | Every RetrievalSpec has a query | `query` present with `field`, `operator`, `value` |
| I-MEM-14 | Ranking strategy is registered | `ranking` ∈ {relevance, recency, salience, confidence} or absent |
| I-MEM-15 | Query operator is registered | `operator` ∈ {equals, contains, matches, exists} |
4.5 Policy invariants (I-MEM-16 through I-MEM-18)
| ID | Invariant | Check |
|---|---|---|
| I-MEM-16 | Consolidation strategy is registered | `consolidationStrategy` ∈ {summarize, prune, archive, merge} or absent |
| I-MEM-17 | Retention duration is valid ISO 8601 | If present, `retentionDuration` parses as ISO 8601 duration |
| I-MEM-18 | Max episodes is positive | `maxEpisodes` is absent or > 0 |
5. MEMORY-LD @context Extension
The MEMORY-LD @context extends the CORE-LD @context with the following term mappings:
{
"@context": {
"MemoryStore": "https://specs.initialcore.net/ns/memory#MemoryStore",
"Episode": "https://specs.initialcore.net/ns/memory#Episode",
"KnowledgeAtom": "https://specs.initialcore.net/ns/memory#KnowledgeAtom",
"Schema": "https://specs.initialcore.net/ns/memory#Schema",
"Index": "https://specs.initialcore.net/ns/memory#Index",
"RetrievalSpec": "https://specs.initialcore.net/ns/memory#RetrievalSpec",
"ForgettingPolicy": "https://specs.initialcore.net/ns/memory#ForgettingPolicy",
"storeType": "https://specs.initialcore.net/ns/memory#storeType",
"capacity": "https://specs.initialcore.net/ns/memory#capacity",
"schema": { "@id": "https://specs.initialcore.net/ns/memory#schema", "@type": "@id" },
"indexes": { "@id": "https://specs.initialcore.net/ns/memory#indexes", "@container": "@set" },
"policy": { "@id": "https://specs.initialcore.net/ns/memory#policy", "@type": "@id" },
"episodic": "https://specs.initialcore.net/ns/memory#episodic",
"semantic": "https://specs.initialcore.net/ns/memory#semantic",
"procedural": "https://specs.initialcore.net/ns/memory#procedural",
"associative": "https://specs.initialcore.net/ns/memory#associative",
"working": "https://specs.initialcore.net/ns/memory#working",
"timestamp": { "@id": "https://specs.initialcore.net/ns/memory#timestamp", "@type": "xsd:dateTime" },
"duration": "https://specs.initialcore.net/ns/memory#duration",
"summary": "https://schema.org/description",
"content": { "@id": "https://specs.initialcore.net/ns/memory#content", "@type": "@id" },
"associations": { "@id": "https://specs.initialcore.net/ns/memory#associations", "@container": "@set" },
"salience": "https://specs.initialcore.net/ns/memory#salience",
"subject": { "@id": "https://specs.initialcore.net/ns/memory#subject", "@type": "@id" },
"predicate": "https://specs.initialcore.net/ns/memory#predicate",
"object": "https://specs.initialcore.net/ns/memory#object",
"confidence": "https://specs.initialcore.net/ns/memory#confidence",
"source": { "@id": "https://specs.initialcore.net/ns/memory#source", "@type": "@id" },
"entityTypes": { "@id": "https://specs.initialcore.net/ns/memory#entityTypes", "@container": "@set" },
"requiredProperties": { "@id": "https://specs.initialcore.net/ns/memory#requiredProperties", "@container": "@set" },
"forbiddenProperties": { "@id": "https://specs.initialcore.net/ns/memory#forbiddenProperties", "@container": "@set" },
"validators": { "@id": "https://specs.initialcore.net/ns/memory#validators", "@container": "@set" },
"indexType": "https://specs.initialcore.net/ns/memory#indexType",
"field": "https://specs.initialcore.net/ns/memory#field",
"unique": "https://specs.initialcore.net/ns/memory#unique",
"hash": "https://specs.initialcore.net/ns/memory#hash",
"ordered": "https://specs.initialcore.net/ns/memory#ordered",
"vector": "https://specs.initialcore.net/ns/memory#vector",
"graph": "https://specs.initialcore.net/ns/memory#graph",
"query": "https://specs.initialcore.net/ns/memory#query",
"ranking": "https://specs.initialcore.net/ns/memory#ranking",
"maxResults": "https://specs.initialcore.net/ns/memory#maxResults",
"includeAssociations": "https://specs.initialcore.net/ns/memory#includeAssociations",
"relevance": "https://specs.initialcore.net/ns/memory#relevance",
"recency": "https://specs.initialcore.net/ns/memory#recency",
"retentionDuration": "https://specs.initialcore.net/ns/memory#retentionDuration",
"salienceThreshold": "https://specs.initialcore.net/ns/memory#salienceThreshold",
"consolidationStrategy": "https://specs.initialcore.net/ns/memory#consolidationStrategy",
"summarize": "https://specs.initialcore.net/ns/memory#summarize",
"prune": "https://specs.initialcore.net/ns/memory#prune",
"archive": "https://specs.initialcore.net/ns/memory#archive",
"merge": "https://specs.initialcore.net/ns/memory#merge"
}
}
6. Composition Examples
6.1 INPUT-LD → MEMORY-LD request
When MEMORY-LD entities are the target of an INPUT-LD Request:
{
"@context": [
"https://specs.initialcore.net/ns/core-ld.jsonld",
"https://specs.initialcore.net/ns/input-ld.jsonld",
"https://specs.initialcore.net/ns/memory-ld.jsonld"
],
"@id": "_:storeQuery",
"@type": "Request",
"intent": "query",
"target": "_:store1",
"parameters": [
{
"@id": "_:ret1",
"@type": "RetrievalSpec",
"query": { "field": "storeType", "operator": "equals", "value": "episodic" },
"ranking": "recency",
"maxResults": 50
}
],
"context": { "actor": "did:icore:user:alice" }
}
6.2 Episodic record with provenance
{
"@context": [
"https://specs.initialcore.net/ns/core-ld.jsonld",
"https://specs.initialcore.net/ns/memory-ld.jsonld"
],
"@id": "_:ep2",
"@type": "Episode",
"timestamp": "2026-07-30T15:30:00Z",
"summary": "Constitutional update applied",
"content": "_:entity3",
"associations": [ "_:entity1", "_:entity2" ],
"salience": 0.92,
"provenance": {
"Representer": "did:icore:system",
"Timestamp": "2026-07-30T15:30:05Z",
"Authority": { "authorityType": "inherent" },
"RepresentationContext": "urn:icore:memory:episodic:v1"
}
}
6.3 KnowledgeAtom store with schema and forgetting
{
"@context": [
"https://specs.initialcore.net/ns/core-ld.jsonld",
"https://specs.initialcore.net/ns/memory-ld.jsonld"
],
"@id": "_:semStore",
"@type": "MemoryStore",
"storeType": "semantic",
"schema": "_:schema1",
"policy": "_:policy1",
"indexes": [ "_:idx1" ],
"provenance": {
"Representer": "did:icore:admin",
"Timestamp": "2026-07-30T10:00:00Z",
"Authority": { "authorityType": "inherent" },
"RepresentationContext": "urn:icore:memory:stores:v1"
}
}
{
"@id": "_:schema1", "@type": "Schema",
"entityTypes": ["KnowledgeAtom"],
"requiredProperties": ["subject", "predicate", "object"]
}
{
"@id": "_:policy1", "@type": "ForgettingPolicy",
"retentionDuration": "P180D",
"salienceThreshold": 0.2,
"consolidationStrategy": "archive"
}
{
"@id": "_:idx1", "@type": "Index",
"name": "byPredicate",
"indexType": "hash",
"field": "predicate"
}
6.4 Memory backing for INPUT-LD
The MEMORY-LD profile pairs with INPUT-LD to create a complete request/remember loop:
Actor → INPUT-LD Request → System processes
↓
Episode recorded → MEMORY-LD Store
↓
Future queries recall via RetrievalSpec
7. Conformance
7.1 Implementation requirements
A conforming MEMORY-LD implementation MUST: 1. Satisfy all CORE-LD conformance requirements (§9 of CORE-LD) 2. Parse the MEMORY-LD @context extension (§5) in addition to the CORE-LD @context 3. Validate all 18 MEMORY-LD invariants (I-MEM-1 through I-MEM-18) 4. Reject documents that violate any CORE-LD or MEMORY-LD invariant 5. Accept any valid CORE-LD document as also valid at the CORE-LD level (MEMORY-LD is additive)
7.2 Conformance levels
| Level | Requirements |
|---|---|
| L1 Episodic | CORE-LD L1 + I-MEM-1 through I-MEM-8 (stores + episodes) |
| L2 Semantic | L1 + I-MEM-9 through I-MEM-12 (knowledge atoms + schemas) |
| L3 Full Retention | L2 + I-MEM-13 through I-MEM-18 (retrieval + forgetting) |
8. Relationship to Other Profiles
| Profile | Relationship |
|---|---|
| INPUT-LD | INPUT-LD requests may target MEMORY-LD stores. Episodes capture request/response pairs. |
| POLICY-LD | Forgetting policies are a form of policy; consolidating memories may be governed by constitutional rules. |
| TRUST-LD | Source confidence, provenance storage, and attestation for memory integrity. |
| OUTPUT-LD | MEMORY-LD retrieval results map to OUTPUT-LD responses. |
9. Future Considerations
- Embedding integration: Standard embedding vector representation as Index metadata
- Memory federation: Cross-store query routing and knowledge merging
- Episodic compression: Timeline merging and conflict resolution for overlapping episodes
- Forgetting as a constitutional right: Audit trails for policy-driven memory removal
- Dream/inference: MEMORY-LD as substrate for reasoning across stored knowledge without external input
MEMORY-LD v0.1.0 — July 30, 2026. Draft. Extends CORE-LD v0.1.0. Second functional profile in the DAG--LD specification family.*