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

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

> This is a method of the [**ChatCommandProtocol**](../classes/ChatCommandProtocol) class in the [**protocols**](../modules/protocols) 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

<ParamField query="name" type="str" required={true}>
  Command name (without /)
</ParamField>

<ParamField query="handler" type="Callable" required={true}>
  Async callable to handle the command
</ParamField>

<ParamField query="description" type="str" required={false} default="''">
  Human-readable description
</ParamField>

<ParamField query="usage" type="Optional[str]" required={false}>
  Usage example string
</ParamField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/protocols.py#L1113">
  `praisonaiagents/bots/protocols.py` at line 1113
</Card>
