Class: HierarchicalStrategy
Defined in: packages/agentos/src/cognition/memory/pipeline/context/strategies/HierarchicalStrategy.ts:39
Implements
Constructors
Constructor
new HierarchicalStrategy(
llmInvoker?):HierarchicalStrategy
Defined in: packages/agentos/src/cognition/memory/pipeline/context/strategies/HierarchicalStrategy.ts:51
Parameters
llmInvoker?
(prompt) => Promise<string>
Writes the summaries. Without one, or when it fails or answers nothing, a segment's summary is its user messages, cut to 80 characters each, and no levels are merged. Either way the window's summary message holds the newest summary whole, within the tokens the segment held, and the older ones only as far as the window has room for them under the compaction threshold.
Returns
HierarchicalStrategy
Properties
name
readonlyname:"hierarchical"
Defined in: packages/agentos/src/cognition/memory/pipeline/context/strategies/HierarchicalStrategy.ts:40
Implementation of
Methods
compact()
compact(
input,config):Promise<CompactionResult>
Defined in: packages/agentos/src/cognition/memory/pipeline/context/strategies/HierarchicalStrategy.ts:55
Parameters
input
config
Returns
Promise<CompactionResult>