Heat the butter in a large, heavy bottom skillet or cast iron skillet over medium-low heat. Add the onion, allowing to sweat for 4-5 minutes.
Add the corn, continue to cook over medium-low heat for 30 minutes, stirring every 5 minutes to cook evenly. The corn and onions should start to lightly brown and caramelize.
Before serving, stir in the agave nectar and salt, mixing to combine. Serve immediately.
If you've tried this recipe, come back and let us know how it was in the comments or star ratings.