Skip to content
1 min read · 68 words

Type Alias: ThoughtRetrievalFn

ts
type ThoughtRetrievalFn = (ctx: TurnContext) => Thought[] | Promise<Thought[]>;

A function that retrieves the thought traces relevant to the current turn.

Parameters

ParameterType
ctxTurnContext

Returns

| Thought[] | Promise<Thought[]>

Remarks

Receives the active TurnContext so implementations can apply turn-aware filtering or attribution (e.g. filtering to a specific agent's identity in multi-agent conversations). May be synchronous or asynchronous.