Type Alias: MemoryRetrievalFn
ts
type MemoryRetrievalFn = (ctx: TurnContext) => Memory[] | Promise<Memory[]>;A function that retrieves the memories relevant to the current turn.
Parameters
| Parameter | Type |
|---|---|
ctx | TurnContext |
Returns
| Memory[] | Promise<Memory[]>
Remarks
Receives the active TurnContext so implementations can filter or rank memories based on turn-specific state (e.g. the system prompt, standing instructions, or stash). May be synchronous or asynchronous.