I'll give you some reading.
https://openaps.org/
https://androidaps.readthedocs.io/en/latest/EN/
I couldnt find the loop docs in a couple minutes.
As far as i know the 640g çannot be looped the 670g only with medtronic loop with medtronic sensors.
The omnipod depends on which version...
I...