Skip to content

Minimal Example

The smallest valid PAM file — one memory entry with integrity hash:

{
"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"
}
}
]
}
  • schema / schema_version — Identifies this as a PAM v1.0 file
  • export_date — When this export was created (ISO 8601)
  • owner.id — Unique identifier for the user
  • memories[].id — Unique identifier for this memory
  • memories[].type — Memory category (skill in this case)
  • memories[].content — The actual memory content as a string
  • memories[].content_hash — SHA-256 hash of the normalized content for integrity verification
  • memories[].temporal.created_at — When the memory was first created
  • memories[].provenance.platform — Which provider this memory originated from

The content_hash is computed from the normalized content string per spec §6:

  1. Trim leading/trailing whitespace
  2. Convert to lowercase
  3. Apply Unicode NFC normalization
  4. Collapse consecutive whitespace to single spaces
  5. Compute SHA-256 hex digest

For "User is a cloud infrastructure engineer", after normalization (becomes "user is a cloud infrastructure engineer"), the hash is sha256:e1bae3ec291c99eced01fc91b4152a0cef541fccf2034fc11b3f90f4e4d79b6e.

from jsonschema import Draft202012Validator
import json
with open("portable-ai-memory.schema.json") as f:
schema = json.load(f)
with open("memory-store.json") as f:
data = json.load(f)
errors = list(Draft202012Validator(schema).iter_errors(data))
print("valid" if not errors else f"{len(errors)} errors")