AI Rule Engine Docs
Go to App

Rule Sets

A rule set is the runnable unit of the engine. It groups an ordered list of rules, defines the input context they operate on, and controls how matching rules are executed.

What a rule set is

Where a project is the container, a rule set is the thing you actually run. Each rule set belongs to one project and has a name (up to 30 characters) and an optional description. When invoked, the engine walks the rule set's rules, evaluates each rule's condition, and fires the actions of the rules that match.

The context definition

A rule set declares a context definition: the named, typed inputs it expects. Each context item has a context key, a data type, an optional description, and a flag for whether it should be pre-populated as initial context (for example, shown on a manual-run form). This definition is the contract callers fill in when they run the set. See Variables & Context and Data Types & Values.

Ordering and matching

Several rule-set settings govern how the rules run:

SettingEffect
Rule orderRules are evaluated in the order they appear in the set.
Randomize rule orderWhen enabled, the rule order is shuffled before matching begins.
Rule sequenceSequential (default) runs matching rules one after another; Parallel runs them concurrently.
Max rules to matchOptional. Stops evaluating once this many rules have matched — useful for first-match-wins behavior.

First match wins Set Max rules to match to 1 and keep the sequence sequential to make a rule set behave like a priority list where only the highest-priority matching rule fires.

How a rule set is invoked

A rule set can be run in three ways:

  • Directly — from the runner in your environment, supplying the input context. See Running Rule Sets.
  • On a schedule — triggered automatically at set times. See Scheduling.
  • From another rule — a rule's Run Rule Set action invokes another rule set, optionally copying the current context and passing named parameters. See Control & Flow Actions.

Creating and editing

Rule sets are built in the rule-set editor or the visual Workflow Builder. From the editor you add rules, attach conditions and actions, define the context, and adjust the ordering settings above. A rule set can also carry an optional input form that gives manual runs a friendly, guided way to enter the context.

Saving as a template

Once a rule set is useful beyond its original project, you can capture it. From a Standard project's dashboard, Save as Template creates a new Template project from the current rule sets, leaving the original untouched. Templates can then be published and reused. See Marketplace Templates.