Skip to content

Interface: AddRuleRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / AddRuleRequest

Defined in: src/types/inference.ts:751

Request to add a rule to the inference engine.

Serialization format: Uses untagged TermInputDto / FeatureInputValueDto.

optional aggregator?: RuleAggregatorDto | null

Defined in: src/types/inference.ts:775

Optional engine-side aggregator declared on the rule head.

When present, the rule’s head term receives an "aggregator" feature containing a serialized RuleAggregator descriptor. See RuleAggregatorDto.


antecedents: TermInputDto[]

Defined in: src/types/inference.ts:765

Antecedent terms (body of the rule). Required, and the engine needs at least one.

A term with no antecedents is a fact, not a rule. The rule routes refuse an empty list with 422 rule rejected: a rule needs at least one antecedent; a term with no antecedents is a fact — write it through POST /api/v1/terms. The type allows an empty array so that validateRule can report that refusal without a write.


optional certainty?: number

Defined in: src/types/inference.ts:767

Certainty factor (default: 1.0).


term: TermInputDto

Defined in: src/types/inference.ts:753

The conclusion term (head of the rule).