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

> register_command: Register a chat command handler.

# register\_command

Method

> This is a method of the [**ChatCommandProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/ChatCommandProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Register a chat command handler.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register_command(name: str, handler: Callable, description: str, usage: Optional[str]) -> None
```

## Parameters

**name** `str` *required*

Command name (without /)

**handler** `Callable` *required*

Async callable to handle the command

**description** `str` (default: '')

Human-readable description

**usage** `Optional[str]`

Usage example string

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/protocols.py#L1328)
>
> `praisonaiagents/bots/protocols.py` at line 1328


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.