Class ConditionalAwaitingTool

  • All Implemented Interfaces:
    com.embabel.agent.api.tool.DelegatingTool , com.embabel.agent.api.tool.Tool , com.embabel.agent.api.tool.ToolInfo

    
    public final class ConditionalAwaitingTool
     implements DelegatingTool
                        

    Tool decorator that conditionally requires awaiting before execution.

    The decider inspects the input context and returns either:

    • An Awaitable to pause execution and wait for user input

    • null to proceed with normal tool execution

    • Constructor Detail

      • ConditionalAwaitingTool

        ConditionalAwaitingTool(Tool delegate, AwaitDecider decider)
        Parameters:
        delegate - The tool to wrap
        decider - Function that decides whether to await based on input context