mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Expanded the pipeline documentation to include details about the Dev Harness and added new features related to compaction strategies and test frameworks.
1.7 KiB
1.7 KiB
Harness "Pipeline"
Focused on answering the question: What's in the pipeline with regards to the Dev Harness?
Features
-
Slot Filling Orchestration (a.k.a. "Guided Conversations")
-
Functional Compaction Strategy
Support a functional pattern for creating a compaction strategy with a range of configurations:
// Setup a chat client for summarization
IChatClient summarizingChatClient = ...;
// Create a compaction strategy based on a menu selection of characteristics
CompactionStrategy tunedStrategy =
CompactionStrategy.Create(
Approach.Balanced,
Size.Compact,
summarizingChatClient);
As an alternative to making every configuration decision:
// Setup a chat client for summarization
IChatClient summarizingChatClient = ...;
// Configure the compaction pipeline with one of each strategy, ordered least to most aggressive.
PipelineCompactionStrategy compactionPipeline =
new(// 1. Gentle: collapse old tool-call groups into short summaries like "[Tool calls: LookupPrice]"
new ToolResultCompactionStrategy(CompactionTriggers.TokensExceed(0x200)),
// 2. Moderate: use an LLM to summarize older conversation spans into a concise message
new SummarizationCompactionStrategy(summarizingChatClient, CompactionTriggers.TokensExceed(0x500)),
// 3. Aggressive: keep only the last N user turns and their responses
new SlidingWindowCompactionStrategy(CompactionTriggers.TurnsExceed(4)),
// 4. Emergency: drop oldest groups until under the token budget
new TruncationCompactionStrategy(CompactionTriggers.TokensExceed(0x8000)));
-
Test Framework: Large Context
-
Stabilization