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

# matches • AI Agent SDK

> matches: Check if this hook matches the target (tool name, etc.).

# matches

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

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

Check if this hook matches the target (tool name, etc.).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def matches(target: str) -> bool
```

## Parameters

<ParamField query="target" type="str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="bool">
  The result of the operation.
</ResponseField>

## Uses

* `re.match`

## Used By

* [`HookRegistry.get_hooks`](../functions/HookRegistry-get_hooks)

## Source

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