Yes, Alli works on AMP Pages.
Self-Optimizing SEO will work on any website, including AMP Pages!
How do you install it?
Though you normally install the Alli code snippet in your site's <head>, in this case, you will need to paste the JavaScript snippet inside the <body> </body> tags of your AMP Pages.
Recommended articles you may interest to read: ๐