Trim the tough ends from the asparagus and cut into 1-inch pieces. Dice the shallots into small, even pieces. In a medium bowl, whisk together the eggs, ricotta, salt, chives, tarragon, and black pepper until well combined and smooth. The ricotta will create a creamy texture, so whisk thoroughly to break up any lumps. Set the egg mixture aside and position your oven rack about 6 inches from the broiler element, then turn the broiler to high so it preheats while you cook on the stovetop.
Melt the butter in a 10-inch oven-safe skillet over medium heat, swirling to coat the pan evenly. Add the diced shallots and cook for about 3 minutes, stirring occasionally, until they become soft and translucent. Add the asparagus pieces and continue cooking for another 3 minutes, stirring gently to combine. The asparagus should start to soften slightly but still have a bit of firmness—you're not trying to fully cook it since it will continue cooking in the broiler. I like to use a quality butter like Kerrygold here because it adds a subtle richness that complements the creamy ricotta beautifully.
Pour the egg mixture from Step 1 evenly over the sautéed shallots and asparagus, tilting the pan gently to distribute it throughout. Reduce the heat to medium and cook undisturbed for 4-5 minutes, until the edges begin to set but the center still looks slightly wet and jiggly. You're looking for the frittata to be mostly cooked on the bottom but still quite runny on top—this is the perfect moment to move it to the broiler.
Scatter the shredded Gruyère evenly over the top of the frittata. Carefully transfer the skillet to the preheated broiler and cook for 6-8 minutes, watching carefully to prevent burning. The cheese will melt and the top will puff slightly and turn golden brown. The eggs in the center should set completely, but they should still be slightly creamy and tender, not rubbery. I find that checking around the 6-minute mark helps you catch it at the perfect moment—you want a nice golden top without any dark spots.
Remove the skillet from the broiler and let it rest for 1-2 minutes so the eggs set completely and the cheese becomes even creamier. Using a rubber spatula, loosen the frittata around the edges and slide it onto a cutting board or serve directly from the skillet. Cut into wedges and serve warm.