Skip to main content

Module tools

Module tools 

Source
Expand description

Built-in tool definitions (JSON schemas for the LLM).

This module defines the tool schemas that get sent to the LLM so it knows what tools are available. The actual execution logic lives in tool_executor.

§Dynamic Tool Selection

The ToolSelector provides context-aware tool loading. Instead of sending all 80+ tools on every LLM call, it loads a core set (~16 tools) and activates additional tool groups when conversation context mentions relevant keywords. Once a group is activated in a bout, it stays active (monotonic growth) to maximize prompt cache hits.

Structs§

ToolSelector
Dynamic tool selector that loads tools based on conversation context.

Enums§

ToolGroup
Groups of contextual tools that activate when conversation context is relevant.

Functions§

all_tools
Return ALL built-in tool definitions (for unrestricted fighters).
tools_for_capabilities
Return all built-in tool definitions that match the given capabilities.