Interface SkillResolver

All Known Implementing Classes:
KeywordSkillResolver, LLMSkillResolver

public interface SkillResolver
Ranks Skills by their relevance to a user message (TNS-289).

This is the bridge between "every skill description is in the always-on system prompt" (cheap, naive) and "every skill is loaded into context" (expensive, wasteful). The resolver picks the top-N candidates whose descriptions go in the prompt; the full body only loads on invocation.

Implementations

  • KeywordSkillResolver — word-overlap scoring against name, description, and whenToUse. Default; no extra round-trip cost.
  • LLMSkillResolver — opt-in; routes the user message and skill descriptions through an LLM scorer. Higher accuracy at the cost of one extra LLM call per turn.
  • Operators with strict requirements ship a custom resolver (e.g. embedding-based) via the same SPI.

Concurrency

Resolvers MUST be safe to call from multiple agent threads; lookup happens on the LLM dispatch hot path.
Since:
0.10.0 (TNS-289)
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(String userMessage, List<Skill> candidates, int limit)
    Pick the limit skills most relevant to userMessage.
  • Method Details

    • resolve

      List<Skill> resolve(String userMessage, List<Skill> candidates, int limit)
      Pick the limit skills most relevant to userMessage. Returned list is ordered most-relevant-first; size is at most limit; an empty list is valid output (no skill matched the threshold).
      Parameters:
      userMessage - the latest user turn
      candidates - the full set of registered skills (caller typically passes SkillStore.list())
      limit - maximum candidates to return; resolvers MUST not exceed this