> ## 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.

# Set Approval Callback • AI Agent SDK

> set_approval_callback: Set a custom approval callback (legacy API).

# set\_approval\_callback

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

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

Set a custom approval callback (legacy API).

The callback is wrapped into a :class:`CallbackBackend` and set as the
global backend on the registry.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def set_approval_callback(callback_fn: Optional[Callable]) -> None
```

## Parameters

<ParamField query="callback_fn" type="Optional[Callable]" required={true}>
  No description available.
</ParamField>

## Uses

* `get_approval_registry`
* `reg.set_backend`
* `CallbackBackend`
* `reg.remove_backend`

## Source

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