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

# Execute Callback • AI Agent SDK

> execute_callback: Execute both sync and async callbacks for a given display type.

# execute\_callback

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

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

Execute both sync and async callbacks for a given display type.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def execute_callback(display_type: str) -> Any
```

## Parameters

<ParamField query="display_type" type="str" required={true}>
  Type of display event \*\*kwargs: Arguments to pass to the callback functions
</ParamField>

### Returns

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

## Uses

* `inspect.signature`
* `asyncio.get_event_loop`
* `loop.run_in_executor`
* `callback`

## Used By

* [`adisplay_interaction`](../functions/adisplay_interaction)
* [`adisplay_self_reflection`](../functions/adisplay_self_reflection)
* [`adisplay_instruction`](../functions/adisplay_instruction)
* [`adisplay_tool_call`](../functions/adisplay_tool_call)
* [`adisplay_error`](../functions/adisplay_error)

## Source

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