Preheat the oven to 350ºF. Spray two 9-inch cake pans with cooking spray. Add some flour to the pans. Tilt and rotate the pans to coat with flour, tapping out any excess. Cut pieces of parchment paper to fit in the bottom of the pans. Place in the pans and spray the paper lightly with more cooking spray.
In a large mixing bowl, whisk together the flour, cocoa powder, coffee or espresso powder, baking soda, and salt. In another mixing bowl, whisk together the coconut sugar, milk, vegan mayonnaise, vanilla extract, and agave. Add the wet ingredients to the dry and stir until fully combined. Divide the batter evenly between the prepared pans and bake for 30 minutes or until a toothpick inserted in the center comes out clean. Let cool in the pans for 10 minutes, then remove to a wire rack to finish cooling.
Make the frosting:
Put the cocoa powder in the bowl of an electric mixer fitted with the paddle attachment. Turn the mixer on low and mix until the cocoa powder is free of lumps. Add the remaining frosting ingredients and, starting on low speed, mix the ingredients, gradually increasing the speed to high and mixing until all ingredients are well combined. Once combined, scrape down the sides and bottom of the mixing bowl with a rubber spatula, then beat on high speed until the frosting is light and fluffy. Refrigerate the frosting to firm up.
Assemble the cake:
Cut a strip of waxed paper and place it on a cake platter to keep your platter clean while frosting. Using a sharp knife or piece of unflavored dental floss, cut the cakes in half horizontally. Place one half of one cake, top side down, on the waxed paper. Spread some frosting on top of the cake and top with the other half of the cake, cut side down. Spread some frosting on top of that layer, then place the bottom half of the other cake, bottom side down, on top. Frost the layer and top with the last cake half, cut side down. Frost the sides and top of the cake. Remove the piece of waxed paper. Refrigerate the cake until 5-10 minutes before serving.