Require Approval • AI Agent SDK

require_approval: Decorator to mark a tool as requiring human approval.

require_approval

Function

</div>

This function is defined in the approval module.

Decorator to mark a tool as requiring human approval.

Signature

python
def require_approval(risk_level: RiskLevel) -> Any

Parameters

ParamField RiskLevel

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • get_approval_registry
  • reg.add_requirement
  • add
  • is_already_approved
  • func
  • is_yaml_approved
  • mark_approved
  • is_env_auto_approve
  • is_async_context
  • RuntimeError

Source

View on GitHub

praisonaiagents/approval/__init__.py at line 203