Chop sweet potatoes into fine cubes and place into large mixing bowl. Toss in garlic, herbs, olive oil, salt, and pepper and mix until sweet potatoes are well coated.
Take a baking sheet and line with parchment paper. Spread out herbed sweet potatoes onto the baking sheet, spreading them out evenly. Roast in the oven for about 35 minutes, until the sweet potatoes are soft and slightly browned.
While the sweet potatoes are roasting, sauté chopped onions in butter over medium-low heat, stirring constantly until browned and caramelized. Lower heat as necessary to avoid burning the onions. Once caramelized, remove from heat and set aside until potatoes are finished roasting.
OPTIONAL: Add ground sausage
If you wish to add sausage to the hash, take ground sausage and sauté over medium heat until well browned and edges are crispy.
Take a cast iron skillet and place onions, roasted sweet potatoes, and optional sausage into the skillet and mix together well until components are evenly distributed.
Dig out 4 sections in the skillet, exposing the bottom surface of the skillet. Crack an egg into each well and season with salt and pepper.
Bake for about 10-15 minutes, until egg whites are set. For runnier yolks, remove from oven at 10 minutes. For harder yolks, leave in the oven another 5 minutes until eggs reach desired doneness.