In a small bowl, combine the warm milk with a pinch of sugar. Sprinkle the yeast over the milk and let it sit for 5-10 minutes, or until frothy.
In a large bowl, whisk together the flour and salt. Cut in the softened butter until the mixture resembles coarse crumbs.
Make a well in the center of the flour mixture. Add the yeast mixture, granulated sugar, and egg. Mix until a dough forms.
Transfer the dough to a floured surface and knead for about 5-7 minutes, or until smooth and elastic.
Place the dough in a greased bowl, cover with a clean kitchen towel, and let it rise in a warm place for about 1-1.5 hours, or until doubled in size.
In a skillet, heat the vegetable oil over medium heat. Add the chopped onion and cook until translucent. Add the ground meat and cook until browned. Season with salt, pepper, and caraway seeds (if using). Remove from heat and let cool.
Punch down the risen dough and transfer it to a floured surface. Roll out the dough to about 1/4-inch thickness. Cut into circles or squares, depending on your preference.
Place a small spoonful of the meat filling in the center of each dough piece. Fold the dough over the filling to form a half-moon shape (for circles) or a pocket (for squares). Pinch the edges to seal.
Place the filled pastries on a parchment-lined baking sheet. Cover with a kitchen towel and let rise for about 30 minutes.
Preheat your oven to 375°F (190°C).
Brush the tops of the pastries with the beaten egg and sprinkle with sesame seeds or poppy seeds, if desired.
Bake in the preheated oven for 15-20 minutes, or until golden brown.
Allow the Piragi to cool slightly before serving.
Enjoy your meal!