01 - Preheat your oven to 350°F (180°C).
02 - Heat the butter and olive oil in a skillet over medium-low heat. Add the sliced onions and cook for 15 to 20 minutes, stirring frequently, until golden and very soft.
03 - Stir in the brown sugar, thyme leaves, salt, and pepper. Continue cooking for 2 to 3 minutes until the onions are deeply caramelized. Remove from heat and set aside.
04 - In a dry skillet over medium heat, toast the pecans for 3 to 5 minutes until fragrant and lightly browned. Chop coarsely if desired.
05 - Place the brie wheel in a small baking dish. For a wrapped version, lay the brie on a sheet of thawed puff pastry, top with the caramelized onions and pecans, fold the pastry around the cheese, and brush with beaten egg.
06 - Spoon the caramelized onions over the brie and scatter the toasted pecans on top. Bake for 15 to 18 minutes until the cheese is soft and beginning to ooze. If using puff pastry, bake 20 to 25 minutes until the pastry is golden brown.
07 - Let the brie stand for 5 minutes to settle. Serve warm alongside crackers or toasted baguette slices.