Replanning Tool
Tool decorator that executes the wrapped tool, adds its result to the blackboard, then throws ReplanRequestedException to terminate the tool loop and trigger replanning.
This enables patterns like:
Chat routing: A routing tool classifies intent and triggers replan to switch handlers
Discovery: A tool discovers information that requires a different plan
Note: This tool accesses AgentProcess via thread-local at call time, which is set by the decorator chain.
Parameters
The tool to wrap
Human-readable explanation of why replan is needed
Callback to update the blackboard before replanning. Receives the result content and can add objects to the blackboard. Defaults to adding the result content as a string.
Constructors
Properties
Functions
Execute the tool with JSON input.
Extension function to convert an Embabel Tool to a Spring AI ToolCallback.
Unwrap a tool to find the innermost implementation. Recursively unwraps DelegatingTool wrappers.
Extension function to wrap a Tool with event publication.