Preheat the oven to 200C/390F/Gas 6.
Cook the asparagus in salted water, or steam for 2-3 minutes until tender. Then drain and immerse in cold water, to cool.
Place the sheet of puff pastry on a greased baking tray, brush with beaten egg and divide into four. Make a shallow cut in each piece of puff pastry, 1cm/0.5in, in from the edge all the way round.
Cook the onion and garlic in the butter and olive oil for 20 to 30 minutes, over a low heat, until caramelised.
Add the mushrooms, balsamic vinegar and sugar and cook for a couple of minutes.
Spoon the onion and mushroom mixture into the centre of each pastry, leaving the edges clear.
Bake for 15-20 minutes until golden, then remove from the oven, scatter with asparagus stalks and crack an egg on each.
Bake for a further eight minutes, then leave to cool slightly before serving with salt and freshly ground black pepper.