Sony Corp. agreed to a more than $1 billion deal to buy online animation service Crunchyroll from AT&T Inc., according to a person familiar with the matter.