Heat avocado oil in a wide pot over medium-low heat. Add the onions and fennel and cook, stirring regularly, for 30-35 minutes until the onions and fennel deepen in color. Season with salt and pepper. You can add 1 teaspoon of sugar if you like them a bit sweeter.
Prepare the sage:
Heat ¼ cup extra virgin olive oil in a small pot over medium heat. Add half the sage leaves in batches, and cook for 2-3 seconds until crispy. Immediately transfer to a paper towel-lined plate and season with salt. Reserve the oil.
Mince the remaining half of the sage and set aside.
Cook the pasta:
Bring a large pot of salted water to a boil and cook pasta until al dente. Reserve ¾ cup pasta water. Drain pasta.*
Make the whipped ricotta:
Combine the ricotta with lemon juice and zest and season with salt. Using a hand mixer, blend until very smooth and creamy. If needed, add a splash or two of milk. Pour in half the reserved sage oil and continue blending until creamy. Set aside.
Finish the pistachios:
Crush all but 4 of the crispy sage leaves and toss with the pistachios. Season with salt and set aside.
Finish the pasta:
Melt the butter into the caramelized onions. Add the minced sage and cook for 1 minute. add ½ cup of the reserved pasta cooking water and bring to a boil. Cook for 3-4 minutes until thickened and reduced slightly. If needed, add more water. Add the pasta and toss to coat. Turn off the heat.
To Serve:
Divide the whipped ricotta between plates and add a touch more of the reserved sage oil on top. Pile the pasta on top and garnish with the pistachios. Place a crispy sage leaf on top. Enjoy!
Notes
Note: Try to time this so that you're draining the pasta right as the onions finish caramelizing.