Add the tequila, lime juice, orange juice, agave and cranberries to a cocktail shaker. Muddle together until the cranberries have released their juices, about 30 seconds of muddling.
Then, add a few ice cubes to the cocktail shaker and shake for about 30 seconds.
Strain out the cranberries and ice and pour the margarita into a glass (additional ice optional).