Agility is crucial in modern software development. Leadership is crucial for team effectiveness. Little research has been conducted to understand the role of leadership in agility in software development. In this study, we investigate the role leadership plays in achieving better performance in software development. Adopting a case study approach, we collected qualitative data to build a theoretical model that describes leadership roles in achieving team agility and improving performance. In our preliminary findings, we identified five leader roles and their leader activities. These leader functions affect two learning processes – experiential learning and vicarious learning which in turn help leaders adjust their behaviors. Such learning processes help achieve better performance by leading to a more mature, agile mentality and team capability to collectively collaborate and respond to changes in a timely manner, improving team performance.