Lua automation plugin

Lua: How to set automation for a plugin?
Sorry, we got lost in the doc and I can’t find anything