Yes, you can substitute gelatin with agar-agar. Use the same amount of agar-agar as mentioned in the recipe, but follow the instructions on the agar-agar packaging for best results.