In the same saucepan you cooked the caramel in, combine the coconut milk, sugar, and vanilla extract.
In a small bowl, mix the agar agar powder and cornstarch (or tapioca starch or arrowroot) with the plant-based milk until well combined.
Add this mixture to the saucepan.
Place the saucepan over medium heat and stir continuously until the mixture comes to a gentle boil. Reduce the heat to low and simmer for three minutes, stirring constantly, to activate the agar agar and thicken the custard.
Carefully pour the custard mixture into the ramekins or mold with the caramel, filling them to the top.
Refrigerate for a minimum of 90 minutes until set. For best results, refrigerate the flans overnight to ensure a firm texture.