Summarizing Conversation Manager (conversation-manager/summarizing-conversation-manager.ts)

harness-sdk · strands-ts/src/conversation-manager/summarizing-conversation-manager.ts · typescript · Apache-2.0
ai, chat, tag:summarization, tag:context, tag:history

Manages conversation history by summarizing older messages when context window overflows.

// Source: https://github.com/strands-agents/harness-sdk | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Summarization-based conversation history management.
 *
 * This module provides a conversation manager that summarizes older messages
 * when the context window overflows, preserving important information rather
 * than simply discarding it.
 */

import type { InvocationContext } from '../agent/invocation-context.js'
import type { LocalAgent } from '../types/agent.js'
import {
  ConversationManager,
  type ProactiveCompressionConfig,
  type ConversationManagerReduceOptions,
} from './conversation-manager.js'
import { applyPinFirst, partitionPinned } from './compression/pin-message.js'
import {
  adjustSplitPointForToolPairs,
  generateSummar

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key