Yes you can and it’s a great vegetarian option. Be aware that agar’s setting power is way stronger than gelatin. I suggest using ½ teaspoon agar for this recipe.