ConversationManagerReduceOptions
type ConversationManagerReduceOptions = { agent: LocalAgent; model: Model; error: ContextWindowOverflowError;};Defined in: src/conversation-manager/conversation-manager.ts:17
Options passed to ConversationManager.reduce.
Properties
Section titled “Properties”agent: LocalAgent;Defined in: src/conversation-manager/conversation-manager.ts:21
The agent instance. Mutate agent.messages in place to reduce history.
model: Model;Defined in: src/conversation-manager/conversation-manager.ts:27
The model instance that triggered the overflow. Used by conversation managers that perform model-based reduction (e.g. summarization).
error: ContextWindowOverflowError;Defined in: src/conversation-manager/conversation-manager.ts:34
The ContextWindowOverflowError that triggered this call.
reduce MUST remove enough history for the next model call to succeed,
or this error will propagate out of the agent loop uncaught.