  This is the first of two papers which construct a purely algebraic
counterpart to the theory of Gromov-Witten invariants (at all genera). These
Gromov-Witten type invariants depend on a Calabi-Yau A-infinity category, which
plays the role of the target in ordinary Gromov-Witten theory. When we use an
appropriate A-infinity version of the derived category of coherent sheaves on a
Calabi-Yau variety, this constructs the B model at all genera. When the Fukaya
category of a compact symplectic manifold X is used, it is shown, under certain
assumptions, that the usual Gromov-Witten invariants are recovered. The
assumptions are that a good theory of open-closed Gromov-Witten invariants
exists for X, and that the natural map from the Hochschild homology of the
Fukaya category of X to the ordinary homology of X is an isomorphism.
