Graduate students are not allowed to claim the AOTC. You may claim the Lifetime Learning Credit (LLC), instead.
You should, probably, prepare an amended return, switching to the LLC. Send it, with a cover letter to the IRS office that contacted you.
Be advised that the LLC is not refundable (unlike part of the AOTC). So, if you did not have a tax liability, amending will not help you; you probably owe what the IRS says.