Interface InfiniteContextConfig

interface InfiniteContextConfig {
    enabled: boolean;
    strategy: CompactionStrategy;
    compactionThreshold: number;
    preserveRecentTurns: number;
    transparencyLevel: TransparencyLevel;
    logRetention: number;
    maxSummaryChainTokens: number;
    targetCompressionRatio: number;
    llmInvoker?: ((prompt) => Promise<string>);
    modelId?: string;
}

Properties

enabled: boolean

Enable infinite context window management.

Compaction strategy to use.

compactionThreshold: number

Trigger compaction when context reaches this fraction of max tokens (0–1).

preserveRecentTurns: number

Turns kept as they are, newest first (two messages a turn), while older messages remain to summarize. A conversation shorter than that, over its threshold all the same, gives up its two oldest messages; the newest message is never summarized.

transparencyLevel: TransparencyLevel

Transparency logging level.

logRetention: number

Max compaction log entries retained in memory.

maxSummaryChainTokens: number

Token budget for the rolling summary chain header.

targetCompressionRatio: number

Target compression ratio for summaries (e.g. 8 = 8:1).

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

Writes the summaries. CognitiveMemoryManager falls back to the reflector's, the observer's or the feature-detection invoker; without any, and when a call fails or answers nothing, compaction writes extractive summaries.

Type declaration

    • (prompt): Promise<string>
    • Parameters

      • prompt: string

      Returns Promise<string>

modelId?: string

Model ID for summarization calls.