Put the flour, margarine, water and salt in the mixing bowl (alternatively: food processor with kneading function) and knead the dough for 2 min. If you do not have a food processor with kneading function, you can also knead the dough by hand. Then wrap the dough well and smoothly kneaded in plastic wrap and put in the refrigerator for 1 hour.
Grease quiche mold.
Add apples, agave syrup, lemon juice and cinnamon to the mixing bowl (alternatively: blender). If using a Thermomix, chop everything with the help of the spatula for 8 sec. / speed 4 or if using a blender, chop on low to medium speed for 8 sec. The mixture should still be chunky, so do not blend for too long.
Preheat the oven to 200° top/bottom heat and take the dough out of the refrigerator.
Flour the work surface, roll out 2/3 of the dough in a round (approx. 30 cm diameter) and place it in the quiche mold, pressing it down so that the bottom and sides are covered and some dough still overlaps. Roll out the remaining 1/3 of the dough also in a round (at least 26 cm), as this will become the cake top.
Spread cornstarch on the bottom of the dough, spread apple-agave syrup mixture smoothly on top and leave 2 tablespoons of the settled liquid in the mixing bowl. Place remaining dough as a cover on top of cake and roll up overlapping ends to form a cord to finish.
Cut the cake top with a sharp knife 3-5 times lengthwise and 3-5 times crosswise, brush the edge and especially the top of the cake with the remaining apple-agave syrup liquid and bake the cake for about 30 min. at 200 degrees in the oven until it turns golden. Let the cake cool briefly and serve.