Preheat oven to 350F and grease a 6-inch round cake pan.
Blend the beans, two eggs, vanilla and sugar in a high speed blender until completely smooth.
If using olive oil: add the olive oil and two remaining eggs and blend again. Add the cocoa powder, baking powder and baking soda and blend until smooth.
If using butter or coconut oil: In a separate large bowl, beat the butter or coconut oil until fluffy. Add the remaining two eggs, beating well after each egg. Beat in the bean mixture until fully combined, then the cocoa powder, baking powder and baking soda. Beat for 1-2 minutes.
Pour half of the batter into the prepared pan and bake for 35-40 minutes, or until the top springs back.
Let cool for 5 minutes before flipping the cake out onto a cooling rack. Let the pan cool completely before pouring the remaining batter into the pan. Bake until done. Let cool for 5 minutes. Allow for both layers to cool completely before icing.
Make the frosting
Simmer the agar flakes and water together for 3 minutes, then whisk in the cocoa powder, maple syrup, vanilla and salt.
Whisk the cornstarch and almond milk in a small bowl and add to the agar mixture. Let simmer for five minutes until very thick, then remove from heat.
Pour into a glass pan or measuring cup and refrigerate for at least 20 minutes, or until the cake is ready to be frosted. Whisk the frosting by hand or with an electric beater to fluff up before frosting the cake.
Notes
*I've tried both olive oil and butter. I prefer butter, but for a few less steps, olive oil is also great!Adapted from here and the Angelica Kitchen cookbook.