Skip to content

NullConversationManager

Defined in: src/conversation-manager/null-conversation-manager.ts:17

A no-op conversation manager that does not modify the conversation history.

Does not register any proactive hooks. Overflow errors will not be retried since reduce always returns false.

new NullConversationManager(options?): NullConversationManager;

Defined in: src/conversation-manager/conversation-manager.ts:121

ParameterTypeDescription
options?ConversationManagerOptionsConfiguration options for the conversation manager.

NullConversationManager

ConversationManager.constructor

protected readonly _compressionThreshold: number;

Defined in: src/conversation-manager/conversation-manager.ts:116

ConversationManager._compressionThreshold


readonly name: "strands:null-conversation-manager" = 'strands:null-conversation-manager';

Defined in: src/conversation-manager/null-conversation-manager.ts:21

Unique identifier for this conversation manager.

ConversationManager.name

initAgent(agent): void;

Defined in: src/conversation-manager/conversation-manager.ts:170

Initialize the conversation manager with the agent instance.

Registers two hooks:

  1. AfterModelCallEvent: Overflow recovery — when a ContextWindowOverflowError occurs, calls ConversationManager.reduce with error set and retries if reduction succeeded.
  2. BeforeModelCallEvent: Proactive compression — when projected input tokens exceed the configured compression threshold, calls ConversationManager.reduce without error. The hook is always registered but only acts when proactive compression is enabled.

Subclasses that override initAgent MUST call super.initAgent(agent) to preserve overflow recovery and proactive compression behavior.

ParameterTypeDescription
agentLocalAgentThe agent to register hooks with

void

ConversationManager.initAgent


reduce(_args): boolean;

Defined in: src/conversation-manager/null-conversation-manager.ts:28

No-op reduction — never modifies the conversation history.

ParameterType
_argsConversationManagerReduceOptions

boolean

false always

ConversationManager.reduce