Strands Agents Typescript SDK
    Preparing search index...

    Class SlidingWindowConversationManager

    Implements a sliding window strategy for managing conversation history.

    This class handles the logic of maintaining a conversation window that preserves tool usage pairs and avoids invalid window states. When the message count exceeds the window size, it will either truncate large tool results or remove the oldest messages while ensuring tool use/result pairs remain valid.

    As a HookProvider, it registers callbacks for:

    • AfterInvocationEvent: Applies sliding window management after each invocation
    • AfterModelCallEvent: Reduces context on overflow errors and requests retry

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods