Heat oven to 375°F Line 2 large baking hseets with parchment paper. Set aside.
In large bowl toss asparagus with 1 Tbsp oil, the herbes, salt and pepper. set aside.
Heat remaining Tbsp oil in skillet and saute onions over med-low heat until browned and very tender, about 20 minutes. Set aside.
On a lighlty floured surface, roll out one sheet of puff pastry to form a 10x15 inch rectangle. Trim a 3-inch wide strip off the bottom side and the right side, (and save pastry strips) to form a 7x12 inch rectangle. Then cut that rectangle into 3 even 4x7 inch pieces.
Brush a 1/2 inch border around the edge of each rectangle with egg. Cut the trimmed strips into 6 1/2-inch pices and use them to form a crust around the edge. Repeat the process with the second sheet so that you have 6 rectangular crusts.
Divide up the onions down the center of each pastry.Neatly arrange the asparagus stalks on each pastry, on top of the onions, tips all facing the same direction.
Bake at 375 F until the pastry is puffed and golden. brown, 25-30 minutes.
Remove from the oven and top with shaved gruyere and fresh ground pepper if desired.