The Rules API can be used from any other source, for example, if you create a Lua program, you could send requests to the API to save/manage that automation.
The program could be able of building a Rule because the structure follows a pattern.
We’re always excited to see your experiments with the developer’s tools. There is a tutorial about the Rules API here:
There’s a Github repo (Sample-RulesAPI) that contains several samples as well which you can copy and edit as required.
We welcome all questions about the Rules API, also, if you have a functionality proposal, we can share it with the corresponding team for them to evaluate.