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

> register_rule: Register a migration rule.

# register\_rule

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

> This is a method of the [**DoctorRulesRegistry**](../classes/DoctorRulesRegistry) class in the [**doctor\_registry**](../modules/doctor_registry) module.

Register a migration rule.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register_rule(rule: DoctorContractProtocol) -> None
```

## Parameters

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

## Uses

* `TypeError`
* `warnings.warn`

## Used By

* [`register_rule`](../functions/register_rule)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/doctor_registry.py#L26">
  `praisonaiagents/runtime/doctor_registry.py` at line 26
</Card>
