Interface ContextWindowManagerConfig

interface ContextWindowManagerConfig {
    maxContextTokens: number;
    infiniteContext: Partial<InfiniteContextConfig>;
    llmInvoker: ((prompt) => Promise<string>);
    observer?: MemoryObserver;
    reflector?: MemoryReflector;
    onTracesCreated?: ((traces) => Promise<void>);
}

Properties

maxContextTokens: number

Maximum context window size in tokens.

infiniteContext: Partial<InfiniteContextConfig>

Infinite context configuration.

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

LLM invoker for summarization.

Type declaration

    • (prompt): Promise<string>
    • Parameters

      • prompt: string

      Returns Promise<string>

observer?: MemoryObserver

Optional: MemoryObserver for hybrid strategy.

reflector?: MemoryReflector

Optional: MemoryReflector for hybrid strategy.

onTracesCreated?: ((traces) => Promise<void>)

Callback to encode traces into long-term memory.

Type declaration

    • (traces): Promise<void>
    • Parameters

      Returns Promise<void>