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

# Get Rule • AI Agent SDK

> get_rule: Get a specific rule by ID.

# get\_rule

Method

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

Get a specific rule by ID.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_rule(rule_id: str) -> Optional[DoctorContractProtocol]
```

## Parameters

**rule\_id** `str` *required*

No description available.

### Returns

**Returns** `Optional[DoctorContractProtocol]`

The result of the operation.

## Uses

* `get_rules`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/doctor_registry.py#L49)
>
> `praisonaiagents/runtime/doctor_registry.py` at line 49


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