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" } } ]}Field Annotations
Section titled “Field Annotations”schema/schema_version— Identifies this as a PAM v1.0 fileexport_date— When this export was created (ISO 8601)owner.id— Unique identifier for the usermemories[].id— Unique identifier for this memorymemories[].type— Memory category (skillin this case)memories[].content— The actual memory content as a stringmemories[].content_hash— SHA-256 hash of the normalized content for integrity verificationmemories[].temporal.created_at— When the memory was first createdmemories[].provenance.platform— Which provider this memory originated from
Content Hash
Section titled “Content Hash”The content_hash is computed from the normalized content string per spec §6:
- Trim leading/trailing whitespace
- Convert to lowercase
- Apply Unicode NFC normalization
- Collapse consecutive whitespace to single spaces
- 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.
Validate
Section titled “Validate”from jsonschema import Draft202012Validatorimport 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")import Ajv2020 from "ajv/dist/2020.js";import {readFileSync} from "node:fs";
const ajv = new Ajv2020({allErrors: true});const schema = JSON.parse(readFileSync("portable-ai-memory.schema.json", "utf8"));const data = JSON.parse(readFileSync("memory-store.json", "utf8"));
const validate = ajv.compile(schema);console.log(validate(data) ? "valid" : `${validate.errors.length} errors`);