π CubicAgent-OpenAI v2.3.6 - AI-Powered Summarizer Tools
π CubicAgent-OpenAI v2.3.6 - AI-Powered Summarizer Tools
π Major New Feature: AI-Powered Summarizer Tools
We're excited to introduce AI-Powered Summarizer Tools, a revolutionary feature that automatically creates intelligent summarizer variants of all your MCP tools using dedicated gpt-4o-mini models for cost-effective analysis.
β¨ What's New
π€ Automatic Tool Enhancement
- Auto-generates
summarize_*variants for every available MCP tool - Dynamic tool creation when server tools are fetched
- Zero configuration needed - works with any existing MCP tool
π° Cost-Effective Intelligence
- Uses
gpt-4o-minifor summarization (cheaper than main models) - Separate token usage tracking for budget optimization
- Configurable via
OPENAI_SUMMARIZER_MODELenvironment variable
π― Custom Summarization
_promptparameter for tailored summarization instructions- Examples: "Focus on errors only", "Extract key metrics", "Highlight anomalies"
- Returns both original results AND AI-generated summary
π Enhanced Monitoring
- Token usage tracking for each summarization
- Cost optimization insights
- Performance analytics
π§ Configuration
Add to your .env file:
OPENAI_SUMMARIZER_MODEL=gpt-4o-miniπ Usage Examples
{
"name": "summarize_getLogs",
"arguments": {
"_prompt": "Focus on errors and warnings only",
"userId": 123,
"timeRange": "24h"
}
}Returns:
{
"success": true,
"originalTool": "getLogs",
"originalResult": { /* complete original data */ },
"summary": "Found 3 errors related to database connectivity...",
"tokensUsed": 45
}ποΈ Technical Improvements
Extended OpenAI Model Support:
- All GPT-4o models (
gpt-4o,gpt-4o-mini) - All GPT-4 variants (
gpt-4,gpt-4-turbo,gpt-4-turbo-preview, etc.) - All GPT-3.5 models (
gpt-3.5-turbovariants)
Robust Architecture:
- Collision-safe
_promptparameter using underscore prefix - Comprehensive error handling and validation
- Automatic integration with InternalToolAggregator
- Complete backward compatibility
Enhanced Documentation:
- 170+ lines of comprehensive usage examples
- Best practices and optimization guidelines
- Cost-effective deployment strategies
π§ͺ Testing
Comprehensive Test Suite:
- Unit tests for all SummarizerToolInstance functionality
- Integration tests with real OpenAI API calls
- Error handling and edge case coverage
- Token usage validation and monitoring
π― Benefits
β
Intelligent Filtering - Extract only relevant information from large datasets
β
Cost Optimization - Use cheaper models for analysis while keeping premium models for reasoning
β
Custom Insights - Get summaries tailored to your specific questions
β
Reduced Complexity - Process large tool outputs more efficiently
β
Flexible Perspectives - Same data, different viewpoints based on prompts
β
Zero Configuration - Works automatically with any MCP tool
π Environment Variables
New:
OPENAI_SUMMARIZER_MODEL(optional) - Enables AI-powered summarization
Enhanced:
- Extended
OPENAI_MODELenum with all OpenAI model variants - Improved validation and error messages
π Version Alignment
This release aligns with the Cubicler ecosystem versioning strategy:
- CubicAgent-OpenAI: v2.3.6 (this release)
- CubicAgentKit: v2.3.4 (dependency)
- Cubicler: v2.3.0 (compatible)
π¦ Installation
# npm
npm install @cubicler/cubicagent-openai@2.3.6
# Global CLI
npm install -g @cubicler/cubicagent-openai@2.3.6
# Direct usage
npx @cubicler/cubicagent-openai@2.3.6π Full Changelog
- feat: Add AI-powered summarizer tools with gpt-4o-mini integration
- feat: Add OPENAI_SUMMARIZER_MODEL environment variable
- feat: Implement SummarizerToolInstance class for individual tool summarization
- feat: Add createSummarizerTools factory function for dynamic tool creation
- feat: Auto-generate summarize_* variants for all available MCP tools
- feat: Include token usage tracking for cost monitoring and optimization
- enhance: Update OpenAIService to create summarizer tools when server tools are fetched
- enhance: Add summarizer tools to InternalToolAggregator for seamless registration
- enhance: Extend message helper to document available summarizer tools in system prompt
- enhance: Support _prompt parameter for custom summarization instructions
- docs: Update README.md with comprehensive summarizer tools documentation
- config: Add OPENAI_SUMMARIZER_MODEL to .env.example with gpt-4o-mini default
- config: Expand environment.ts schema to support all OpenAI models
- test: Add comprehensive unit tests for SummarizerToolInstance
- test: Add integration tests for real OpenAI API summarization
- chore: Bump version to 2.3.6 to align with Cubicler ecosystem
π Acknowledgments
This release represents a significant step forward in making AI agent interactions more intelligent and cost-effective. The summarizer tools feature enables developers to get focused insights from tool results while maintaining complete access to original data.
β Don't forget to star the repository if you find CubicAgent-OpenAI useful!
π Found an issue? Report it on GitHub Issues