Transfer the vinegar to a small saucepan and bring it to a gentle simmer over medium-high heat.
Once the vinegar is simmering, remove the saucepan from the heat and add the cloves, star anise, ginger, cinnamon, seeds, black peppercorns, and agave if using. Set aside for 10 minutes.
Meanwhile, slice the red onion with the grain using a sharp chef’s knife or mandolin.
If using red chili pepper, slice roughly and remove the seeds, or include the seeds for more spice.
Place the onion and red chili into a glass container with a tight-fitting lid. Pour the vinegar and spices over the onion.
Add 1 cup water, plus more as needed to cover the onion.
Refrigerate. These No-Cook Pickled Red Onions can be used immediately but taste best after being refrigerated overnight.