Description
Problem Statement
Summary
Implement intelligent, context-aware tool selection using LLM-based categorization, usage pattern learning, and tool discovery.
Problem
Strands Agents currently passes all tools to the LLM on every request, wasting tokens, making selection difficult, providing no learning from usage patterns, and preventing tool discovery.
Proposed Solution
Solution
Create a ToolManager interface with StaticToolManager for backward compatibility and RetrievalToolManager for intelligent selection. Use LLM-based CRUDL categorization to classify tools as CREATE, READ, UPDATE, DELETE, or LIST operations for better semantic matching.
Leverage existing agent.tool.store_in_kb and agent.tool.retrieve for tool indexing and selection. Store successful usage patterns in the knowledge base for learning. Provide meta-tools for LLM tool discovery and requests.
Implementation
foundation with backward compatibility, CRUDL categorization, usage tracking, tool discovery meta-tools, and testing with documentation.
Use Case
For larger sets of tools, reduce what is sent to the LLM on each call, thus reducing both token count and improving tool selection.
Benefits
Reduction in tool tokens, faster inference, better accuracy, context-aware selection, usage learning, and discovery capabilities while maintaining clean code and full backward compatibility.
Alternatives Solutions
We should consider internal memory based semantic matching vs KB based.
Additional Context
No response