This page shows you how to create a rule from a built-in template and how to turn it on or off afterward.
Prerequisites
- You need permission to modify the project the rule watches. Without it, the + New rule button doesn't appear, and opening a new-rule link takes you back to the Rules page. For details, see Project permissions.
- The project must already exist. To set one up, see Create a project.
Pick a template
- Go to the Rules page of your project. You can also start from the shared Rules page, which lists rules across all projects. To learn how the two versions differ, see Find your way around.

- Select + New rule. The New rule page opens with the template catalog.
- Find the template you want. You can:
- Enter a name, key, or description in Search templates.
- Select a kind: All kinds, Deterministic, Aggregate, Judge, or Classifier.
- Select a category in the Category list.
Each card shows the template's name, default severity, key, description, unit, and check kind. To learn what units and check kinds mean, see the rules overview.
If you started from a project's Rules page, templates that project already uses are marked In use, and you can't choose them.

- Select the template's card, or select Configure › on it. The Configure rule page opens.
Configure and enable the rule
The header of the Configure rule page shows the template name, its key, unit, and check kind, and its description. An aside called How this rule evaluates (read-only) shows the logic the template uses to decide whether the rule applies and when it fails. For aggregate rules, it shows the metric, the grouping, and the comparison instead, run as one SQL query per window. You can't change that logic. For judge rules, the aside also shows the prompt the judge uses. Select Show full prompt › to read the whole prompt.

- For Name, keep the suggested name or enter your own. The suggestion is the template name followed by the project slug, for example
Empty output — checkout. If no project is chosen, the suggestion is the template name alone. If you change the project before you type a name, the suggestion updates to match. - For Project, choose the project this rule watches. A rule watches exactly one project. If you started from a project's Rules page, that project is already filled in.
- For Severity, select LOW, MEDIUM, HIGH, or CRITICAL. The template's default severity is selected at first. If the template has none, MEDIUM is selected.
- For Sampling, enter a percentage from 1 to 100. The default is 100. Aggregate rules don't show this field.
- Fill in the template's parameters. For details, see Fill in parameters.
- Select Save & enable. The button reads Saving… while the rule saves.
The rule is saved and turned on right away. You return to the Rules page, filtered to the rule's project. Evaluation starts within about 30 seconds.
To leave without saving, select Cancel. You return to the template catalog.
Fill in parameters
Each template declares its own parameters. Each template's page in the rules catalog lists its parameters and their defaults, for example Banned term in output.
- Each field label shows the parameter's name and whether it's required or optional.
- Fields that take a regular expression add · RE2 regex to the label. Enter a pattern in RE2 syntax. The page doesn't check the pattern's syntax before you save.
- Each field matches the kind of value it takes. Lists of choices appear as options you turn on or off, numbers get a number box, patterns get a larger text area, and other text gets a text box.
- A description appears under each field, followed by examples. Select an example to put it in the field.
- Fields start with the template's default values. Some required fields, such as Banned terms, have no default, so you must enter a value.
- If the template has no parameters, the page shows "Nothing to configure — this template has no parameters."
Turn a rule on or off
Turning off a rule stops evaluation, but the rule and its findings stay. Turning a rule on or off doesn't create a new version of it. The change takes effect within about 30 seconds.
To turn a rule on or off from the rules list:
- On the Rules page, in the Status column, turn the rule's switch on or off. The switch label reads on or off.
To turn a rule on or off from its edit page:
- On the Rules page, select the rule's name. The Edit rule page opens.

- In the Danger zone, select Disable or Enable.
You only see the switch and the Danger zone if you have permission to modify the rule's project. Without it, the Status column shows only on or off.
Troubleshooting
Errors when you save
Error messages appear after you select Save & enable.
| Message | What to do |
|---|---|
| "Pick the project this rule watches." | Choose a project for Project. |
| "The rule needs a name." | Enter a Name. |
| "This project already has a rule using this template." | Choose another project, or open the existing rule from the Rules page and edit it. This message appears as soon as you choose the project, and Save & enable stays unavailable until you change it. |
| "Sampling is a percentage from 1 to 100." | Enter a whole percentage between 1 and 100 for Sampling. |
| "Banned terms is required." | Enter a value for the named parameter. |
| "Latency budget (ms) must be a whole number." | Enter a number without decimals. |
| "Percent increase to alert on must be a number." | Enter a number. |
| "Maximum characters must be at least 1." | Enter a larger value. |
| "Percent increase to alert on cannot exceed 1000." | Enter a smaller value. |
| "Which classes to report has an unknown class: ssn" | Choose only from the classes the field offers. |
If the server rejects the rule, the page shows the server's reasons, separated by " · ". For example:
- "a rule named 'Empty output — checkout' already exists — edit it instead of creating it again": choose another name, or open the existing rule from the Rules page and edit it.
Judge or classifier rule records no results
Judge and classifier rules use a model to check your traffic. They run only when AIO has a model API key configured for them. Without one, they aren't evaluated and record no results. Ask your administrator to configure the key.
Next steps
- Rules overview: learn what rules check, when they fire, and what a verdict is.
- Explore traces: find the traces your rules flag.
- Project permissions: check who can create and change rules.

Have a suggestion?