Questions & Answers about Agradezco haber hablado con mi profesora antes del examen.
Haber hablado is the perfect infinitive. It refers to an action that was already completed before the feeling in the main verb.
- Agradezco hablar con mi profesora would sound like I appreciate speaking / to speak with my teacher, which suggests the action in a more general or simultaneous way.
- Agradezco haber hablado con mi profesora means I am grateful to have spoken with my teacher — the conversation happened first, and now the speaker feels grateful about it.
So the perfect infinitive is used because the speaking happened before the moment of gratitude.