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

# Resolve Hook Event • AI Agent SDK

> resolve_hook_event: Resolve an event id to a :class:`HookEvent`, or ``None`` if unknown.

# resolve\_hook\_event

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

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

Resolve an event id to a :class:`HookEvent`, or `None` if unknown.

Accepts the enum itself, its canonical value (`"kanban_task_moved"`) and
its member name (`"KANBAN_TASK_MOVED"`). Emitting call sites historically
used the member name, so both spellings must reach the same subscribers.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph TD
    event["Event Trigger"] --> hook["Hook: resolve_hook_event"]
    hook --> decision{"Decision"}
    decision -- "Allow" --> proc["Process"]
    decision -- "Deny" --> block["Block"]
    style hook fill:#189AB4,color:#fff
    style event fill:#8B0000,color:#fff
    style proc fill:#8B0000,color:#fff
    style block fill:#8B0000,color:#fff
```

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def resolve_hook_event(event: Union[str, HookEvent]) -> Optional[HookEvent]
```

## Parameters

<ParamField query="event" type="Union[str, HookEvent]" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Optional[HookEvent]">
  The result of the operation.
</ResponseField>

## Uses

* `HookEvent`

## Used By

* [`fire_hook`](../functions/fire_hook)

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Hooks Concept" icon="anchor" href="/docs/docs/concepts/hooks" />

  <Card title="Hook Events" icon="bolt" href="/docs/docs/features/hook-events" />

  <Card title="Callbacks" icon="phone" href="/docs/docs/features/callbacks" />
</CardGroup>
