Execute Callback • AI Agent SDK

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

execute_callback

Async

Function

</div>

This function is defined in the main module.

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

Callback errors are logged and suppressed so observers cannot abort the run.

Signature

python
async def execute_callback(display_type: str) -> Any

Parameters

ParamField str

Type of display event **kwargs: Arguments to pass to the callback functions

Returns

ResponseField Any

The result of the operation.

Uses

  • asyncio.get_running_loop
  • loop.run_in_executor
  • sync_callback
  • logging.exception
  • async_callback

Used By

Source

View on GitHub

praisonaiagents/main.py at line 184