Domain Tool Tracker
Tracks domain instances and provides tools from them.
When a single instance of a registered domain class is retrieved, this tracker binds @LlmTool methods from that instance.
Supports two modes:
Registered sources mode: Only binds instances of explicitly registered types
Auto-discovery mode: Binds any object with @LlmTool methods, replacing previous bindings
In both modes, "last wins" - when a new matching artifact arrives, it replaces any previously bound instance.
Parameters
List of registered domain tool sources (empty for auto-discovery mode)
When true, discovers tools from any object with @LlmTool methods
Optional agent process for predicate evaluation
Constructors
Functions
Drain and return all pending tools discovered via auto-discovery. After calling this method, the pending buffer is cleared. Used by com.embabel.agent.spi.loop.ToolChainingInjectionStrategy to inject tools mid-loop.
Check if an instance is bound for the given type.
Check if the given artifact is a single instance of a registered domain class (or any class with @LlmTool methods in auto-discovery mode). If so, bind it and return any tools extracted from it.