A∞-algebras on directed graphs