Countrywide reaches fair-lending agreement with N.Y. attorney general

Lender will back $3 million education program, compensate minorities