Skip to content

With Relations

PAM supports semantic relations between memories via the relations array. Each relation specifies a directional link between two memories with a type and optional confidence score.

{
"schema": "portable-ai-memory",
"schema_version": "1.0",
"export_date": "2026-02-17T00:00:00Z",
"owner": {
"id": "user-123"
},
"memories": [
{
"id": "mem-001",
"type": "skill",
"content": "User is a cloud infrastructure engineer",
"content_hash": "sha256:e1bae3ec291c99eced01fc91b4152a0cef541fccf2034fc11b3f90f4e4d79b6e",
"temporal": { "created_at": "2026-02-15T00:00:00Z" },
"provenance": { "platform": "chatgpt" }
},
{
"id": "mem-002",
"type": "preference",
"content": "User prefers terraform over cloudformation",
"content_hash": "sha256:85613bb561dda27606c3a2f3eb0e606f40f53af0fab0da60b2b95ed92ac1d890",
"temporal": { "created_at": "2026-02-15T00:00:00Z" },
"provenance": { "platform": "chatgpt" }
}
],
"relations": [
{
"id": "rel-001",
"from": "mem-002",
"to": "mem-001",
"type": "derived_from",
"confidence": 0.9,
"created_at": "2026-02-15T00:00:00Z"
}
]
}
TypeSemantics
supportsSource provides evidence for target
contradictsSource conflicts with target (useful for tracking belief changes)
extendsSource adds detail to target
supersedesSource replaces target
related_toGeneral semantic relationship
derived_fromSource was inferred from target
FieldTypeRequiredDescription
idstringyesUnique identifier for the relation
fromstringyesSource memory ID
tostringyesTarget memory ID
typestringyesRelation type (see above)
confidencenumber | nullnoConfidence in the relationship [0.0–1.0]
created_atstringyesISO 8601 timestamp

See spec §13 for full relation semantics.