Sergio Pérez and Red Bull have agreed to part ways, bringing an end to the Mexican driver’s stint with the Formula 1 team.