Skip to main content

Module memory

Module memory 

Source
Expand description

Long-term memory management (Phase 7).

Kernel defines memory types and validation rules; SDKs perform I/O and selection. No I/O in this module — pure classification and validation logic.

Structs§

MemoryKey
Stable logical key used for memory upserts.
MemoryPolicy
Declarative configuration for the kernel’s long-term memory subsystem.
MemoryProvenance
Origin and evidence attached to a memory record.
MemoryQuery
Scoped recall request. The host owns retrieval; the kernel validates this deterministic wire and caps top_k through MemoryPolicy.
MemoryRecall
One scored host recall. score is relevance, distinct from the record’s stored confidence.
MemoryRecallLifecycle
Journaled recall lifecycle for one record (M3). Carried on MemoryRecalled so the host mirrors the kernel-authoritative counts into its durable store.
MemoryRecord
A durable fact with stable identity, provenance, and lifecycle state.
MemoryRecordStore
Pure in-kernel helper implementing scoped, identity-preserving upsert semantics.
MemoryScope
Isolation boundary for a memory record.
MemoryValidation
Memory validation rules (kernel-enforced).

Enums§

MemoryAuthor
Principal responsible for producing a memory record.
MemoryKind
Memory kind (4 types, mirroring Claude Code’s taxonomy).
MemoryTrustLevel
Explicit trust classification kept separate from authorship.
MemoryUpsertError
MemoryUpsertOutcome
MemoryValidationError
Memory validation error.

Functions§

memory_retention_score
Deterministic retention score for a durable record, evaluated at current_turn.
validate_memory_write
Validate a memory write request with default validation rules.