Skip to content

Memory Store Schema

The Memory Store is the root document of every PAM export and the only required file. It contains all user memories, relations, conversations index, integrity verification, and optional cryptographic signatures.

portable-ai-memory.schema.json

Schema: JSON Schema Draft 2020-12 · License: Apache 2.0

FieldTypeDescription
schemastringMUST be "portable-ai-memory"
schema_versionstringSemantic version. Current: "1.0"
ownerOwnerThe individual who owns these memories
memoriesMemoryObject[]Array of memory objects — the primary payload
FieldTypeDefaultDescription
spec_uristring | nullnullURI of the specification version. Serves as identifier, not a fetchable resource
export_idstring | nullnullUUID v4 for this export. Enables tracking and duplicate detection
exported_bystring | nullnullSystem that generated the export. Format: system-name/major.minor.patch
export_datestringISO 8601 timestamp of export
relationsRelationObject[][]Semantic relationships between memories
conversations_indexConversationIndexEntry[][]Lightweight conversation references
integrityIntegrityBlockIntegrity verification block
export_type"full" | "incremental""full"Full or incremental (delta) export
base_export_idstring | nullnullFor incremental: export_id of the base export
sincestring | nullnullFor incremental: only memories after this timestamp
type_registrystring | nullnullURI of the custom type registry
signatureSignatureBlocknullCryptographic signature for authenticity

When signature is present (not null), export_id and export_date become required (enforced by the schema via if/then).

The individual who owns these memories. For cross-platform identity resolution, the did field SHOULD be populated with a W3C Decentralized Identifier.

FieldTypeRequiredDescription
idstringyesUnique owner identifier (SHOULD be UUID v4)
didstring | nullnoW3C Decentralized Identifier for cross-platform identity
created_atstringnoISO 8601 timestamp when the owner record was created

A single portable memory unit — the fundamental unit of PAM.

FieldTypeDescription
idstringUnique identifier. SHOULD be UUID v4
typeMemoryTypeMemory type from the closed taxonomy
contentstringNatural language content — the primary semantic payload
content_hashstringSHA-256 of normalized content (spec §6). Pattern: ^sha256:[a-f0-9]{64}$
temporalTemporalBlockTemporal metadata. created_at is required
provenanceProvenanceBlockOrigin metadata. platform is required
FieldTypeConditionDescription
custom_typestring | nullRequired when type == "custom"Custom type identifier. MUST be null when type is not "custom"
FieldTypeDefaultDescription
statusMemoryStatus"active"Lifecycle state
summarystring | nullnullShort summary for display
tagsstring[][]Lowercase tags. Pattern: ^[a-z0-9][a-z0-9_-]*$
confidenceConfidenceBlockSystem-computed confidence scoring
accessAccessBlockAccess control for multi-agent scenarios
embedding_refstring | nullnullReference to entry in embeddings file
metadataMetadataBlockAdditional metadata (extensible)

Closed taxonomy of memory types:

TypeDescription
factObjective, verifiable information about the user
preferenceUser preference, taste, or stated desire
skillCompetency, expertise, or demonstrated ability
contextSituational or temporal context
relationshipRelation to another person, entity, or organization
goalActive objective or aspiration
instructionHow the user wants to be treated or addressed
identityPersonal identity information
environmentTechnical or physical environment details
projectActive project or initiative
customExtensible type. Requires custom_type field

Lifecycle states:

StatusDescription
activeCurrent and valid. Default state
supersededReplaced by a newer memory
deprecatedStill valid but no longer prioritized
retractedExplicitly invalidated by the user
archivedRetained for historical purposes only
FieldTypeRequiredDescription
created_atstringyesISO 8601 timestamp of creation
updated_atstring | nullnoLast update timestamp
valid_fromstring | nullnoWhen this memory becomes valid
valid_untilstring | nullnoWhen this memory expires
superseded_bystring | nullnoID of the memory that replaced this one

Origin tracking for auditability and cross-platform conflict resolution.

FieldTypeRequiredDescription
platformstringyesSource platform identifier. Pattern: ^[a-z0-9_-]{2,32}$ (e.g., chatgpt, claude, gemini)
platform_user_idstring | nullnoUser ID on source platform
conversation_refstring | nullnoReference to conversations_index entry
message_refstring | nullnoReference to specific message
extraction_methodstring | nullnoHow the memory was extracted: llm_inference, explicit_user_input, api_export, browser_extraction, manual
extracted_atstring | nullnoISO 8601 timestamp of extraction
extractorstring | nullnoSystem that performed extraction

System-computed confidence scoring. NOT user-defined priority.

FieldTypeRequiredDescription
initialnumbernoConfidence at extraction time [0.0–1.0]
currentnumbernoCurrent confidence after decay/reinforcement [0.0–1.0]
decay_modelstring | nullno"time_linear", "time_exponential", or "none"
last_reinforcedstring | nullnoISO 8601 timestamp of last reinforcement

Access control for multi-agent and federated scenarios.

FieldTypeDefaultDescription
visibilitystring"private""private", "shared", or "public"
exportablebooleantrueWhether this memory may be included in exports
shared_withAccessGrant[][]List of access grants
FieldTypeRequiredDescription
entitystringyesIdentifier of the entity granted access
permissionsstring[]yesArray of: "read", "write", "delete"

Additional metadata. Allows additionalProperties for extensibility.

FieldTypeDescription
languagestring | nullBCP 47 language tag (e.g., "en", "pt-BR")
domainstring | nullKnowledge domain (e.g., "technical", "personal")
custom fieldsanyImplementations MAY add additional fields

A semantic relationship between two memory objects, forming edges in a knowledge graph.

FieldTypeRequiredDescription
idstringyesUnique identifier
fromstringyesSource memory ID
tostringyesTarget memory ID
typestringyessupports, contradicts, extends, supersedes, related_to, derived_from
confidencenumber | nullnoConfidence in this relationship [0.0–1.0]
created_atstringyesISO 8601 timestamp

Lightweight index entry for a conversation. Full message history is stored externally as companion files.

FieldTypeRequiredDescription
idstringyesUnique conversation identifier
platformstringyesSource platform identifier. Pattern: ^[a-z0-9_-]{2,32}$
temporalobjectyesTemporal metadata (created_at required, updated_at optional)
titlestring | nullnoConversation title
message_countinteger | nullnoNumber of messages
tagsstring[]noTags or topics. Pattern: ^[a-z0-9][a-z0-9_-]*$
derived_memoriesstring[]noIDs of memories derived from this conversation (advisory)
storageStorageReferencenoReference to full conversation data

Reference to external storage for large data objects.

FieldTypeRequiredDescription
typestringyes"file", "database", "object_storage", "vector_db", "uri"
refstringyesPath, URI, or identifier to the stored data
formatstring | nullnoData format: "json", "jsonl", "csv", "parquet"

Integrity verification. Checksum is SHA-256 of the canonicalized memories array using RFC 8785 (JCS). Memories are sorted by id ascending before canonicalization.

FieldTypeRequiredDescription
canonicalizationstringnoDefault: "RFC8785". Currently the only supported method
checksumstringyesSHA-256 of canonicalized memories. Format: sha256:<hex>
total_memoriesintegeryesMUST equal the length of the memories array

Cryptographic signature over the export. The signature payload is {checksum, export_id, export_date, owner_id} canonicalized with RFC 8785 (spec §18.3).

FieldTypeRequiredDescription
algorithmstringyesEd25519 (recommended), ES256, ES384, RS256, RS384, RS512
public_keystringyesPublic key of the signer
valuestringyesBase64url-encoded signature (RFC 4648 §5)
signed_atstringyesISO 8601 timestamp
key_idstring | nullnoKey identifier. If owner.did is present, SHOULD be a DID URL