Combine 6 pandan leaves and ¾ cups of water in a blender. Blend until smooth and strain the pandan juice through a fine mesh sieve. Press the pandan leaves into the sieve to wring out as much juice as possible. Set aside.
In a sauce pan, combine 1 tbsp of agar agar powder with 2 cups of water (for the pandan layer). In a separate sauce pan, combine 1 tbsp of agar agar powder and ⅓ cup of water (for the coconut layer). Mix both and set aside for the agar agar powder to bloom (~15 minutes).
Once done, add ¼ cup of granulated sugar, ⅛ tsp of pandan paste (optional), and 1 pinch of salt to the first sauce pan for the pandan layer. To the second sauce pan for the coconut layer, add 1 can of coconut milk, 1/4 cup of granulated sugar, ⅛ tsp of salt, and 2 pandan leaves.
Place both pans on the stove and turn on the heat to high. Whisk both at the same time until both liquids come to a boil. Lower the heat to simmer and simmer for 1 minute before removing both from the heat. Make sure both layers are boiling before removing them from the heat as that will ensure the agar agar has fully dissolved.
Into a 8.5x6.5 inch baking dish, pour ¾ cup of the pandan mixture for the first layer. Place the dish into the fridge for 6 minutes.
Take out the first layer and slowly pour ¾ cup of the coconut mixture for the second layer. I like to do this over the back of a spoon so the mixture slowly pours into the dish without breaking the first layer. Let the coconut layer sit until it has hardened. You can test out this layer by lightly tapping the edges of the layer. If it feels solid, it should be set.
Repeat this process until you run out of both mixtures and there are 3 layers each of pandan and coconut. Put the dish in the fridge to set for 15 minutes before serving.
Once set, release the jelly from the dish. Invert the dish over a cutting board. Trim off the edges and cut it into 9 equal pieces.