For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ruleset

Apply complex business rules and act on the outcome.

A simple if/else handles a basic decision — is loanAmount over 5000? Ruleset handles the ones that aren't basic: nested conditions, ANDs and ORs across several data points, tiers.

It applies a predefined set of rules to your input and emits events based on which rules matched. The rules live in a Ruleset Builder rather than in the workflow, so business users can change the logic without touching the workflow — which is usually the actual reason to reach for this skill.

Reference layer pending. This page documents the skill's purpose and configuration as used in the builder. Its formal configuration schema, output schema, and error codes are not yet documented — see the Skill Library overview.

Worked example: automated underwriting

A workflow processes incoming loan applications. The initial approval decision depends on credit score, income, debt-to-income ratio, and loan amount, across several tiers:

if (Credit Score > 700 AND Debt-to-Income < 35%) OR (Loan Amount < 5000 AND Years of Employment > 2) then Approve

The problem. Building that with chained conditional nodes gets messy, unreadable, and hard to change — and it's exactly the logic most likely to change.

The approach. Define the rules once in the Ruleset Builder. The skill evaluates the applicant's data against them and outputs a decision — Approved, Rejected, ManualReview — that the workflow acts on.

1. Point at the ruleset. Select the ID of your underwriting ruleset in Ruleset ID.

2. Map your data to its facts. The ruleset expects a Credit Score fact; your workflow has applicant.credit_score. Mappings bridges that gap, as sourcetarget pairs:

  • Source — the path in your workflow: $input.applicant.credit_score

  • Target — the fact name in the ruleset: Credit Score

Output

events — a list. Each entry has an event name and a set of params:

{
  "events": [
    {
      "event": "Approved",
      "params": { "status": "pass", "nextStep": "continue" }
    }
  ]
}

statusCode200 success · 400 no rules matched, or a mapping error.

Note that 400 covers no rules matched. That is not necessarily a failure — an application matching no rule may be a real case needing a human — but it arrives looking like an error, so handle it explicitly.


To add this skill to an agent, see Adding a Skill to the Agent.

Last updated