Register Approval Callback • AI Agent SDK

register_approval_callback: Register a global approval callback function for dangerous tool operations.

register_approval_callback

Function

</div>

This function is defined in the main module.

Register a global approval callback function for dangerous tool operations.

Signature

python
def register_approval_callback(callback_fn: Any) -> Any

Parameters

ParamField Any

Function that takes (function_name, arguments, risk_level) and returns ApprovalDecision

Returns

ResponseField Any

The result of the operation.

Source

View on GitHub

praisonaiagents/main.py at line 143