Function: effectiveRecallBudget()
effectiveRecallBudget(
i):EffectiveRecallBudget
Defined in: packages/agentos/src/cognition/memory/retrieval/recall/budget.ts:236
The memory block's budget on one model: the smaller of the configured budget and what is left of the model's
retrieved-context share (PROMPT_CONTEXT_SHARE of contextTokens, floored) after the turn's RAG and
long-term-memory text. Never below 0.
Parameters
i
contextTokens
number
The model's context size as PromptEngine budgets it (optimalContextTokens, else maxContextTokens).
otherContextTokens
number
The tokens of the turn's other retrieved context.
totalTokens
number
The configured budget.
Returns
The budget, with invalid set when an input was not a finite number in range.