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

# register • AI Agent SDK

> register: Register a hook definition.

# register

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

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

Register a hook definition.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register(hook: HookDefinition) -> str
```

## Parameters

<ParamField query="hook" type="HookDefinition" required={true}>
  The hook definition to register
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  The hook ID
</ResponseField>

## Uses

* `logger.debug`

## Used By

* [`HookRegistry.register_function`](../functions/HookRegistry-register_function)
* [`HookRegistry.register_command`](../functions/HookRegistry-register_command)

## Source

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