Companion
Functions
When the decider returns a ReplanDecision, replan after execution, adding the artifact to the blackboard along with any additional updates from the decision. The decider receives the artifact cast to type T and the replan context. If the artifact is null or cannot be cast to T, the decider is not called.
Create a tool with no parameters (Java-friendly). This method is easier to call from Java as it uses the Handler interface.
Create a tool with input schema (Java-friendly).
Create a tool with custom metadata (Java-friendly).
Create a fully configured tool (Java-friendly).
Format a list of tools as an ASCII tree structure. UnfoldingTools are expanded recursively to show their inner tools.
Create a tool with strongly typed input and output (Java-friendly).
Create a tool with strongly typed input and output with custom metadata (Java-friendly).
Create a tool with strongly typed input and output with custom ObjectMapper (Java-friendly).
Kotlin-friendly extension for creating typed tools with reified type parameters.
Create Tools from all methods annotated with LlmTool on an instance.
Create a Tool from a Java method annotated with LlmTool.
Create a Tool from a Kotlin method annotated with LlmTool.
Create a tool with no parameters.
Create a tool from a function.
Wrap a tool to publish all artifacts to the blackboard.
Wrap a tool to publish artifacts of the specified type to the blackboard.
Wrap a tool to publish artifacts of the specified type to the blackboard, with optional filtering and transformation.
Make this tool always replan after execution, adding the artifact to the blackboard.
Replan and add the object returned by the valueComputer to the blackboard.
When the predicate matches the tool result artifact, replan, adding the artifact to the blackboard. The predicate receives the artifact cast to type T. If the artifact is null or cannot be cast to T, returns normally.
Safely create Tools from an instance, returning empty list if no annotated methods found. This is useful when you want to scan an object that may or may not have tool methods.
Wrap a tool to sink artifacts of the specified type to the given sink. Handles both single artifacts and Iterables.
Wrap a tool to sink artifacts of the specified type to the given sink, with optional filtering and transformation.