> ## Documentation Index
> Fetch the complete documentation index at: https://agentheya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# rules

> An ordered list of guardrails and behavioural constraints injected into the system prompt. Each rule has an enforcement level; a rule can also be a…

# `rules` — Rules

An ordered list of guardrails and behavioural constraints injected into the system prompt. Each rule has an enforcement level; a rule can also be a `callback` that fires a webhook when the rule fires.

**Section key** `rules` · **Shape** array · **Tier** All plans\
**Edit in the dashboard:** [Rules page](/sidebar-menu/rules)

> List of rule objects. Each entry is injected into the system prompt as a hard constraint.

## Fields (per item)

| Field          | Required | Type    | Allowed values / constraints     | Default | Description                                                                                                                                                                                                                                                                                                                                                                             |
| -------------- | -------- | ------- | -------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`         | **yes**  | string  | —                                | —       | Short name for this rule, e.g. "No medical advice".                                                                                                                                                                                                                                                                                                                                     |
| `text`         | **yes**  | string  | —                                | —       | The rule in full. Be specific and actionable.                                                                                                                                                                                                                                                                                                                                           |
| `enforcement`  | no       | enum    | one of `hard`, `default`, `soft` | —       | How strictly to enforce this rule, which controls the phrasing it receives in the system prompt and its precedence when rules conflict. 'hard' = MUST NEVER violate (guardrail — refuse or find a compliant alternative); 'default' = follow unless there is a clear, stated reason not to; 'soft' = prefer when otherwise free to choose, drop under pressure. Omit to mean 'default'. |
| `type`         | no       | string  | —                                | —       | Rule type. 'text' = plain instruction injected into system prompt; 'callback' = fires an HTTP webhook when violated. Defaults to 'text'.                                                                                                                                                                                                                                                |
| `callback_url` | no       | string  | —                                | —       | For type='callback': HTTP endpoint the platform calls when this rule fires. Leave empty for text rules.                                                                                                                                                                                                                                                                                 |
| `bearer_token` | no       | string  | —                                | —       | Bearer token sent in the Authorization header for the callback URL.                                                                                                                                                                                                                                                                                                                     |
| `collapsed`    | no       | boolean | —                                | —       | UI hint — start this entry collapsed in the dashboard editor.                                                                                                                                                                                                                                                                                                                           |
