Toast the coconut: Heat a dry skillet over medium. Add 1 to 1 1/4 cups unsweetened shredded coconut and stir until golden, 3–5 minutes.
Transfer to a plate to cool. Reserve a small handful for garnish.
Make and bake the crust: Preheat oven to 350°F (175°C). In a bowl, whisk almond flour, coconut flour, sweetener, and salt.
Stir in melted butter, egg, and vanilla until it forms a dough. Press evenly into a 9-inch pie plate, going up the sides. Prick the bottom with a fork.
Bake 12–15 minutes until golden at the edges. Cool completely.
Bloom the gelatin: Sprinkle gelatin over 2 tablespoons cold water in a small bowl. Let it sit 5 minutes to absorb.
If using agar, you’ll add it directly to the hot liquid later.
Start the custard base: In a medium saucepan, combine coconut milk, heavy cream, sweetener, and salt. Heat over medium until steaming and small bubbles appear at the edges, but do not boil.
Temper the yolks: In a separate bowl, whisk egg yolks. Slowly pour in 1/2 cup of the hot mixture while whisking constantly.
Repeat with another 1/2 cup. Return the tempered yolks to the saucepan, whisking as you pour.
Thicken the custard: Cook over medium-low, stirring constantly with a spatula, until the custard thickens and coats the back of the spatula, about 5–7 minutes. Do not let it boil hard.
Set with gelatin (or agar): Remove from heat.
Whisk in the bloomed gelatin until fully dissolved. If using agar, return to medium heat, whisk in agar powder, and simmer gently for 1–2 minutes to activate.
Finish the filling: Stir in butter (or coconut oil), vanilla, and 1 cup toasted coconut until smooth. Taste for sweetness and adjust if needed.
Fill and chill: Pour the warm filling into the cooled crust.
Smooth the top. Let it cool to room temperature, then refrigerate uncovered for 30 minutes. Cover and chill at least 4 hours, preferably overnight, until fully set.
Whip the topping: In a cold bowl, beat heavy cream with powdered sweetener and vanilla to soft peaks.
For coconut cream, scoop only the solid cream and whip until fluffy.
Finish and serve: Spread or pipe whipped cream over the chilled pie. Sprinkle with reserved toasted coconut. Slice with a warm, dry knife for clean pieces.