AIToolApproval

data class AIToolApproval(val title: String, val message: String? = null, val reason: String? = null, val allowTitle: String? = null, val declineTitle: String? = null, val decision: AIToolApproval.Decision? = null)

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.

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. The default card then shows "Allow" in the app's language.

declineTitle

The label of the button that declines it, or null when the agent sent none. The card then shows "Don't allow" in the app's language.

decision

How the person answered, once they did.

Constructors

Link copied to clipboard
constructor(title: String, message: String? = null, reason: String? = null, allowTitle: String? = null, declineTitle: String? = null, decision: AIToolApproval.Decision? = null)

Types

Link copied to clipboard
value class Decision(val rawValue: String)

How the person answered. An open set: compare against the decisions you know.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard