AIRuleVersions are the immutable snapshots that hold the text of a rule . Luzmo writes one whenever the name or the content of a rule changes, in our UI or via the API, and numbers them per rule starting at 1. They cannot be created, updated or deleted through the API: a rule is edited by updating the rule , and its versions follow.
Use this resource to read the history of a rule, to show who wrote which revision, and to pick the identifier you want to publish: publishing is done by passing an id from this list as the published_version_id of the rule. The rule itself tells you which of these versions is being edited ( latest_version_id ) and which one the Agents apply ( published_version_id ); the version carries no publication state of its own.
If you only need the draft text or the published text of a rule, you do not need this call: include latest_version or published_version when you retrieve the rule.
Every member of the organization can read the versions of the rules of that organization, including the ones that were never published. Versions are removed together with their rule.
npm install @luzmo/nodejs-sdk{
"count": 2,
"rows": [
{
"id": "9b1d2f34-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"ai_rule_id": "c1f4a0c2-6c9e-4f6b-9a5a-3f0d2b8f1e77",
"version": 1,
"name": "Discount policy",
"content": "Never quote a discount below cost price. Escalate to the account manager instead.",
"created_by": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
"created_at": "2026-09-18T09:04:11.204Z"
},
{
"id": "2e7c8a10-4b3d-4a2f-9c1e-7d6b5a4f3e2d",
"ai_rule_id": "c1f4a0c2-6c9e-4f6b-9a5a-3f0d2b8f1e77",
"version": 2,
"name": "Pricing policy",
"content": "Never quote a discount below cost price. Escalate to the account manager, and record the reason.",
"created_by": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
"created_at": "2026-09-18T09:31:02.880Z"
}
]
}