Gate dangerous tool executions with CallContext.request_confirmation(). Pause and require approval before delete, drop, or other risky operations.
Gate dangerous tool executions with CallContext.request_confirmation():
from orxhestra.tools import CallContextasync def confirm_dangerous(ctx, tool_name: str, tool_args: dict) -> None: if tool_name in ("delete_file", "drop_table"): call_ctx = CallContext(ctx) call_ctx.request_confirmation()
When request_confirmation() is called from a before_tool_callback, the tool execution is paused and a confirmation request event is yielded. The caller must approve or reject before execution continues.