Search FlexiRule docs

Recent
Pinned

Press Esc to close. Use arrow keys and Enter inside results. Searches are remembered locally.

FlexiRule Docs

Action Metadata Schema

Reference specification for action metadata used by AI and programmatic tools.

Improve this page

Action Metadata Schema#

This document defines the recommended metadata structure for FlexiRule actions. This metadata is intended to support AI rule generation, automated validation, search optimization, and Copilot features.


Purpose#

Standardized metadata allows AI models and system tools to understand the capabilities and requirements of an action without parsing natural language documentation. This enables:

  • AI Rule Generation: Helping LLMs select the correct action for a business requirement.
  • Validation: Catching configuration errors before execution.
  • Discovery: Powering the “Action Zone” search and filtering.
  • Recommendations: Suggesting relevant next steps in a rule flow.

Field Definitions#

FieldTypeDescription
actionstringThe unique identifier of the action (e.g., assignment, query-records).
categorystringThe high-level grouping (e.g., data, flow, integration).
targetsarrayList of data types this action can modify (doc, vars, db).
operatorsarrayList of supported operations (if applicable).
supports_conditionsbooleanWhether individual components support row-level guards.
supports_batch_operationsbooleanWhether the action can perform multiple operations in one node.
triggers_compatiblearrayLifecycle events where this action is safe to use.

Constraints#

  1. Lower-case: All string identifiers should be lower-case and use hyphens for separation (kebab-case).
  2. Explicit Targets: If an action does not modify data, targets should be an empty list [].
  3. Strict Operators: Only list operators that are formally supported by the backend handler.

Example Payloads#

1. Assignment Action#

{
  "action": "assignment",
  "category": "data",
  "targets": ["doc", "vars"],
  "operators": ["set", "clear", "increment", "decrement", "append", "merge", "toggle"],
  "supports_conditions": true,
  "supports_batch_operations": true,
  "triggers_compatible": ["any"]
}

2. Query Records Action#

{
  "action": "query-records",
  "category": "data",
  "targets": ["vars"],
  "operators": ["list", "doc", "exists", "count", "sum", "avg", "min", "max"],
  "supports_conditions": false,
  "supports_batch_operations": false,
  "triggers_compatible": ["any"]
}

3. Condition Action#

{
  "action": "condition",
  "category": "flow",
  "targets": [],
  "operators": ["and", "or", "any", "all", "none"],
  "supports_conditions": false,
  "supports_batch_operations": true,
  "triggers_compatible": ["any"]
}

Future Extensibility#

As the FlexiRule engine evolves, the metadata schema may be expanded to include:

  • Type Safety: Expected data types for inputs and outputs.
  • Resource Cost: Estimated performance impact (e.g., low, medium, high).
  • Security Scopes: Required permissions to execute the action.
Last updated Jun 26, 2026