Execute Sync • AI Agent SDK

execute_sync: Synchronous version of execute.

execute_sync

Method

</div>

This is a method of the HookRunner class in the runner module.

Synchronous version of execute.

Signature

python
def execute_sync(event: HookEvent, input_data: HookInput, target: Optional[str]) -> List[HookExecutionResult]

Parameters

ParamField HookEvent

The event to execute hooks for

ParamField HookInput

Input data for the hooks

ParamField Optional[str]

Optional target to filter hooks

Returns

ResponseField List[HookExecutionResult]

List of execution results

Uses

  • get_hooks
  • run_coroutine_from_any_context
  • execute

Source

View on GitHub

praisonaiagents/hooks/runner.py at line 186