Confirmation

@Composable
fun Confirmation(title: String, description: String, onApprove: () -> Unit?, onDeny: () -> Unit?, modifier: Modifier = Modifier, input: String? = null, onDecide: (ToolDecision) -> Unit? = null, withReason: Boolean = true)(source)

Human-in-the-loop approval (AI Elements <Confirmation>): what the agent wants to do, with approve / deny actions. Null callbacks render read-only. With onDecide the user can also deny with a reason or edit the call's JSON input before approving (AG-UI approve-with-edits, AI SDK reason); pass a null input or withReason = false where the backend cannot carry them.