Conditional Replanning Tool
Tool decorator that executes the wrapped tool, then conditionally triggers replanning based on the result.
Unlike ReplanningTool which always triggers replanning, this tool allows the ReplanDecider to inspect the result and decide whether to replan.
Note: This tool accesses AgentProcess via thread-local at call time, which is set by the decorator chain.
Parameters
delegate
The tool to wrap
decider
Decider that inspects the result context and determines whether to replan
Properties
Functions
Link copied to clipboard
Execute the tool with JSON input.
Link copied to clipboard
Extension function to convert an Embabel Tool to a Spring AI ToolCallback.
Link copied to clipboard
Unwrap a tool to find the innermost implementation. Recursively unwraps DelegatingTool wrappers.
Link copied to clipboard
fun Tool.withEventPublication(agentProcess: AgentProcess, action: Action?, llmOptions: <Error class: unknown class>): Tool
Extension function to wrap a Tool with event publication.