> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Register Approval Callback • AI Agent SDK

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

# register\_approval\_callback

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**main**](../modules/main) module.

Register a global approval callback function for dangerous tool operations.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register_approval_callback(callback_fn: Any) -> Any
```

## Parameters

<ParamField query="callback_fn" type="Any" required={true}>
  Function that takes (function\_name, arguments, risk\_level) and returns ApprovalDecision
</ParamField>

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/main.py#L119">
  `praisonaiagents/main.py` at line 119
</Card>
