Skip to main content

Interface: ContextWindowManagerConfig

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:34

Properties​

infiniteContext​

infiniteContext: Partial<InfiniteContextConfig>

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:38

Infinite context configuration.


llmInvoker()?​

optional llmInvoker: (prompt) => Promise<string>

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:45

Writes the summaries. infiniteContext.llmInvoker takes its place when set. Without either, compaction runs on extractive summaries: each strategy takes the segment's user messages (or the hybrid strategy's observation notes), and the summary chain joins and cuts its oldest summaries.

Parameters​

prompt​

string

Returns​

Promise<string>


maxContextTokens​

maxContextTokens: number

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:36

Maximum context window size in tokens.


observer?​

optional observer: MemoryObserver

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:47

Optional: MemoryObserver for hybrid strategy.


onTracesCreated()?​

optional onTracesCreated: (traces) => Promise<void | string[]>

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:55

Encodes a compaction's traces into long-term memory. It runs after the turn goes on, and the ids it answers become the compaction's tracesCreated in the log.

Parameters​

traces​

Partial<MemoryTrace>[]

Returns​

Promise<void | string[]>


reflector?​

optional reflector: MemoryReflector

Defined in: packages/agentos/src/cognition/memory/pipeline/context/ContextWindowManager.ts:49

Optional: MemoryReflector for hybrid strategy.