Aller au contenu

Validator

Ce contenu n’est pas encore disponible dans votre langue.

The official Python SDK is the recommended way to validate PAM files. It performs deep validation beyond schema compliance — verifying content hashes, cross-references, integrity blocks, and temporal consistency.

Terminal window
pip install 'portable-ai-memory[cli]'
pam validate memory-store.json

For programmatic usage, bundle validation, and all available options, see the Validation Guide.

CheckWhat it verifies
Schema complianceRequired fields, correct types, valid enums
Content hashesEach content_hash matches actual content per spec §6 normalization
Integrity blocktotal_memories count and aggregate checksum
Cross-referencesRelations, conversation_ref, superseded_by, and derived_memories point to existing objects
Temporal orderingcreated_atupdated_at, valid_fromvalid_until
ID uniquenessNo duplicate memory, relation, or conversation IDs
Custom typestype='custom' requires custom_type and vice versa
Status consistencysuperseded status ↔ superseded_by field
Conversation DAGMessage parent_id and children_ids consistency

If you can’t use Python, you can validate against the JSON Schemas directly with any JSON Schema Draft 2020-12 validator. See the Validation Guide for jsonschema and ajv examples. Manual validation only checks schema compliance.