Skip to contents

A default implementation of a human approval callback that prompts the user interactively to approve or deny tool execution.

Usage

prompt_human_approval(tool_info)

Arguments

tool_info

A list containing tool information with elements:

  • name: The name of the tool being called

  • arguments: A list of arguments passed to the tool

  • id: The unique identifier for this tool call

Value

TRUE if approved, FALSE if denied

Examples

if (FALSE) { # \dontrun{
# Set up an agent with interactive approval
agent <- new_agent("assistant", ellmer::chat_anthropic) |>
  set_approval_callback(prompt_human_approval)
} # }