Package 

Class AIToolApproval


  • 
    public final class AIToolApproval
    
                        

    What a tool call asks the person it waits for before it runs, such as "Share your location?", and how they answered.

    The agent's backend writes it on the call's ai_tool_call step, which waits with status awaiting_approval, and holds the call until the person answers. Allowed, the call goes on (a client tool then awaits the device); declined, it is cancelled and never runs.

    • Constructor Detail

      • AIToolApproval

        AIToolApproval(String title, String message, String reason, String allowTitle, String declineTitle, AIToolApproval.Decision decision)
        Parameters:
        title - The question, such as "Share your location?".
        message - What allowing it shares or does, such as "Only your city is shared.
        reason - The agent's own words for why it wants the call, such as "to check the local weather".
        allowTitle - The label of the button that allows the call, or null when the agent sent none.
        declineTitle - The label of the button that declines it, or null when the agent sent none.
        decision - How the person answered, once they did.