Check rules against changed records (trigger engine)

Trigger engine: when something happens to a record (it is added, changed or removed) and a rule's condition holds, say what the rule sends, and to which tool, workflow or target, for every matching rule

Give rules (each with a match_condition over the changed record, read as change.<field> and envelope.address_text, and a dispatch: target plus output_template) and the records that changed ({address, path?, value} or {address, removed: true}). Returns fires: every send the rules made, with its target and the payload filled from the record, plus the engine's outcome records and any failures. Rules only see changes given after them, so a rule never fires for the past. Nothing is sent; the caller runs each fire.

What it asks for

  • rules (Needed, list): The rules, as the trigger engine reads them
  • changes (Needed, list): The records that changed, oldest first
  • records (Optional, list): Optional: other current records a rule may read
  • partition (Optional, words): Optional: whose records these are

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to trigger engine: when something happens to a record (it is added, changed or removed) and a rule's condition holds, say what the rule sends, and to which tool, workflow or target, for every matching rule”

What your AI calls: run_tool {"tool_id":"tool:evaluate-rules-over-records"}