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
def register_approval_callback(callback_fn: Any) -> AnyParameters
ParamField
AnyFunction that takes (function_name, arguments, risk_level) and returns ApprovalDecision
Returns
ResponseField
AnyThe result of the operation.
Source
View on GitHubpraisonaiagents/main.py at line 143