  We establish a bialgebra theory for anti-flexible algebras in this paper. We
introduce the notion of an anti-flexible bialgebra which is equivalent to a
Manin triple of anti-flexible algebras. The study of a special case of
anti-flexible bialgebras leads to the introduction of anti-flexible Yang-Baxter
equation in an anti-flexible algebra which is an analogue of the classical
Yang-Baxter equation in a Lie algebra or the associative Yang-Baxter equation
in an associative algebra. It is a unexpected consequence that both the
anti-flexible Yang-Baxter equation and the associative Yang-Baxter equation
have the same form. A skew-symmetric solution of anti-flexible Yang-Baxter
equation gives an anti-flexible bialgebra. Finally the notions of an $\mathcal
O$-operator of an anti-flexible algebra and a pre-anti-flexible algebra are
introduced to construct skew-symmetric solutions of anti-flexible Yang-Baxter
equation.
