Expand description
Tool Composition Discovery — analyzes dispatch sequences to find common patterns.
When tools are frequently called in sequence (e.g. memory.search →
memory.create → memory.associate), the composition discovery module
identifies these patterns and surfaces them as reusable “tool chains”.
This enables:
- Suggesting next tools based on recent dispatch history
- Identifying common workflows for documentation or automation
- Detecting co-usage patterns that could become composite tools
§How it works
The CompositionTracker records tool names in dispatch order. A sliding
window of recent calls is maintained. Periodically, the window is scanned
for recurring subsequences of length 2–5. Patterns that appear at least
min_frequency times are promoted to CompositionPattern entries.
Structs§
- Composition
Config - Configuration for composition discovery.
- Composition
Pattern - A discovered tool composition pattern (a frequent sequence of tool calls).
- Composition
Tracker - Tracks tool dispatch sequences and discovers composition patterns.