> ## 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 Sync • AI Agent SDK

> execute_sync: Synchronous version of execute.

# execute\_sync

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**HookRunner**](../classes/HookRunner) class in the [**runner**](../modules/runner) module.

Synchronous version of execute.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def execute_sync(event: HookEvent, input_data: HookInput, target: Optional[str]) -> List[HookExecutionResult]
```

## Parameters

<ParamField query="event" type="HookEvent" required={true}>
  The event to execute hooks for
</ParamField>

<ParamField query="input_data" type="HookInput" required={true}>
  Input data for the hooks
</ParamField>

<ParamField query="target" type="Optional" required={false}>
  Optional target to filter hooks
</ParamField>

### Returns

<ResponseField name="Returns" type="List[HookExecutionResult]">
  List of execution results
</ResponseField>

## Uses

* `asyncio.get_running_loop`
* `asyncio.ensure_future`
* `execute`
* `loop.run_until_complete`
* `asyncio.run`

## Source

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