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.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NullConversationManager(options?): NullConversationManager;Defined in: src/conversation-manager/conversation-manager.ts:121
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options? | ConversationManagerOptions | Configuration options for the conversation manager. |
Returns
Section titled “Returns”NullConversationManager
Inherited from
Section titled “Inherited from”ConversationManager.constructor
Properties
Section titled “Properties”_compressionThreshold
Section titled “_compressionThreshold”protected readonly _compressionThreshold: number;Defined in: src/conversation-manager/conversation-manager.ts:116
Inherited from
Section titled “Inherited from”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.
Overrides
Section titled “Overrides”Methods
Section titled “Methods”initAgent()
Section titled “initAgent()”initAgent(agent): void;Defined in: src/conversation-manager/conversation-manager.ts:170
Initialize the conversation manager with the agent instance.
Registers two hooks:
AfterModelCallEvent: Overflow recovery — when a ContextWindowOverflowError occurs, calls ConversationManager.reduce witherrorset and retries if reduction succeeded.BeforeModelCallEvent: Proactive compression — when projected input tokens exceed the configured compression threshold, calls ConversationManager.reduce withouterror. 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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
agent | LocalAgent | The agent to register hooks with |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”reduce()
Section titled “reduce()”reduce(_args): boolean;Defined in: src/conversation-manager/null-conversation-manager.ts:28
No-op reduction — never modifies the conversation history.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
_args | ConversationManagerReduceOptions |
Returns
Section titled “Returns”boolean
false always