Uso dei pronomi diretti con il passato prossimo

When using compound verb tenses, such as the present perfect (passato prossimo), the past participle (participio passato) must agree in number and gender with the direct object pronoun that precedes the verb, and with ne as well.

Hai letto il giornale? Sì, l’ho (lo ho) letto stamattina
Hai visto la nuova insegnante? No, non l’ho (la ho) ancora vista
Hai controllato i biglietti? Sì, li ho controllati attentamente
Hai incontrato le tue amiche? Le ho incontrate lo scorso sabato
Hai comprato le pere? Sì, ne ho comprate cinque

The same rule applies to combined pronouns (indirect + direct pronouns): the past participle (participio passato) must agree in number and gender with the combined pronoun that precedes the verb.

Giacomo mi ha chiesto il libro e io gliel'ho (glielo ho) dato
Silvia mi ha chiesto la bicicletta e io gliel'ho (gliela ho) prestata
Gianni mi ha chiesto gli appunti e io glieli ho dati
Sara ha chiesto le fotocopie e io gliele ho prestate

The agreement of the past participle is optional with direct object pronouns mi, ti, ci, vi.

Ieri ho cercato te e Alex, ma non vi ho trovati / trovato
Scusa, Maria: non ti avevo vista / visto!