MemoryDefinition<T>
Interface: MemoryDefinition<T>
Defined in: src/memory/define.types.ts:237
The opaque value defineMemory() returns. Agent.memory() consumes
one of these per memory the consumer registers; multiple definitions
layer cleanly via per-id scope keys (memoryInjection_${id}).
Generic T is the payload shape stored — Message for episodic,
Fact for semantic, NarrativeBeat for narrative, RunSnapshot for
causal. The factory infers T from type.
Type Parameters
T
T = unknown
Properties
asRole
readonlyasRole:ContextRole
Defined in: src/memory/define.types.ts:257
Role to use when injecting formatted content into the messages slot.
description?
readonlyoptionaldescription?:string
Defined in: src/memory/define.types.ts:242
Surfaces in narrative / Lens hover.
id
readonlyid:string
Defined in: src/memory/define.types.ts:239
Stable identifier. Becomes the scope-key suffix and the Lens label.
projection?
readonlyoptionalprojection?:SnapshotProjection
Defined in: src/memory/define.types.ts:263
Snapshot projection — only meaningful when type === CAUSAL.
read
readonlyread:ReadonlyMemoryFlowChart<T>
Defined in: src/memory/define.types.ts:248
Compiled read subflow (built by the factory from type × strategy).
redact?
readonlyoptionalredact?:MemoryRedactionPolicy
Defined in: src/memory/define.types.ts:260
Reserved for a future release — patterns to redact before write.
timing
readonlytiming:MemoryTiming
Defined in: src/memory/define.types.ts:254
When read runs. Default TURN_START.
type
readonlytype:MemoryType
Defined in: src/memory/define.types.ts:245
Which TYPE shape — gates legal STRATEGY combinations.
write?
readonlyoptionalwrite?:ReadonlyMemoryFlowChart<T>
Defined in: src/memory/define.types.ts:251
Compiled write subflow. Optional — EPHEMERAL-style configs omit.
