Skip to content

spikesoftware/AgenticUtilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 AgenticUtilities.MessageReducer

A lightweight, testable C# library for reducing chat history size in agentic AI workflows using summarization. Designed for use with Microsoft Semantic Kernel, this utility helps maintain context within token limits by collapsing older conversation turns into concise summaries.


✨ Features

  • Summarizes oldest N turns when token count exceeds model limits
  • Uses Semantic Kernel's IChatCompletionService for LLM summarization
  • Token-aware via Tokenizer (e.g., TiktokenTokenizer)
  • Configurable thresholds via MessageReducerOptions
  • Fully unit-testable with injectable dependencies
  • Clean logging and cancellation support

📦 Installation

Clone the repo and add the project to your solution:

git clone https://github.com/spikesoftware/AgenticUtilities.git

About

Illustration of code project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages