Interfaces

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

readonly asRole: ContextRole

Defined in: src/memory/define.types.ts:257

Role to use when injecting formatted content into the messages slot.


description?

readonly optional description?: string

Defined in: src/memory/define.types.ts:242

Surfaces in narrative / Lens hover.


id

readonly id: string

Defined in: src/memory/define.types.ts:239

Stable identifier. Becomes the scope-key suffix and the Lens label.


projection?

readonly optional projection?: SnapshotProjection

Defined in: src/memory/define.types.ts:263

Snapshot projection — only meaningful when type === CAUSAL.


read

readonly read: ReadonlyMemoryFlowChart<T>

Defined in: src/memory/define.types.ts:248

Compiled read subflow (built by the factory from type × strategy).


redact?

readonly optional redact?: MemoryRedactionPolicy

Defined in: src/memory/define.types.ts:260

Reserved for a future release — patterns to redact before write.


timing

readonly timing: MemoryTiming

Defined in: src/memory/define.types.ts:254

When read runs. Default TURN_START.


type

readonly type: MemoryType

Defined in: src/memory/define.types.ts:245

Which TYPE shape — gates legal STRATEGY combinations.


write?

readonly optional write?: ReadonlyMemoryFlowChart<T>

Defined in: src/memory/define.types.ts:251

Compiled write subflow. Optional — EPHEMERAL-style configs omit.

On this page