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

# Hook Definition • AI Agent SDK

> HookDefinition: Hook definition with matcher and configuration.

# HookDefinition

> Defined in the [**types**](../modules/types) module.

<Badge color="blue">AI Agent</Badge>

Hook definition with matcher and configuration.

```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: HookDefinition"]
    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
```

## Properties

<ResponseField name="id" type="str">
  No description available.
</ResponseField>

<ResponseField name="event" type="HookEvent">
  No description available.
</ResponseField>

<ResponseField name="matcher" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="sequential" type="bool">
  No description available.
</ResponseField>

<ResponseField name="enabled" type="bool">
  No description available.
</ResponseField>

<ResponseField name="name" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="description" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="timeout" type="float">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="matches()" icon="function" href="../functions/HookDefinition-matches">
    Check if this hook matches the target (tool name, etc.).
  </Card>
</CardGroup>

## Source

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

***

## Related Documentation

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

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

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