In a large mixing bowl, combine the all-purpose flour, bread flour, salt, and sugar. Mix well to combine.
Add the active sourdough starter and warm water to the dry ingredients. Mix until a shaggy dough forms.
Gently fold in the mashed raspberries and chopped pistachios until evenly distributed.
Knead the dough on a lightly floured surface for about 5-7 minutes until smooth and elastic.
Place the dough in a lightly greased bowl, cover with a damp cloth, and let it rise at room temperature for 4-6 hours, or until doubled in size.
Once risen, punch down the dough and divide it into 8 equal pieces. Shape each piece into a ball and then poke a hole in the center to form a bagel shape.
Place the shaped bagels on a parchment-lined baking sheet. Cover and let them rest for 30 minutes.
Preheat your oven to 425°F. In a large pot, bring water to a boil and add the baking soda.
Carefully drop the bagels into the boiling water, a few at a time, and boil for 1-2 minutes on each side. Remove with a slotted spoon and return to the baking sheet.
Beat the egg and brush it over the top of each bagel for a shiny finish.
Bake in the preheated oven for 20-25 minutes, or until golden brown. Let cool on a wire rack before serving.