Functions
defineMemory
Function: defineMemory()
defineMemory(
options):MemoryDefinition
Defined in: src/memory/define.ts:87
Build a MemoryDefinition from a high-level { type, strategy, store }
config. Internally dispatches to one of the existing pipeline factories
(defaultPipeline / semanticPipeline / factPipeline / narrativePipeline /
autoPipeline / ephemeralPipeline) and wires the compiled flowcharts
into the opaque definition that Agent.memory() consumes.
Supported combinations:
| type | strategy.kind | underlying pipeline |
|---|---|---|
| EPISODIC | WINDOW | defaultPipeline |
| EPISODIC | BUDGET | defaultPipeline |
| EPISODIC | SUMMARIZE | defaultPipeline + summarize stage |
| SEMANTIC | TOP_K | semanticPipeline |
| SEMANTIC | EXTRACT | factPipeline |
| SEMANTIC | WINDOW | factPipeline (recency-load) |
| NARRATIVE | EXTRACT | narrativePipeline |
| NARRATIVE | WINDOW | narrativePipeline (recency-load) |
| (any) | HYBRID | autoPipeline (when sub-strategies map cleanly) |
Unsupported combinations throw with a remediation hint pointing to a
working alternative or to the raw mountMemoryRead/mountMemoryWrite
helpers for power users.
