  This paper is part of an ongoing series of works on the study of foliations
on algebraic varieties via derived algebraic geometry. We focus here on the
specific case of globally defined vector fields and the global behaviour of
their algebraic integral curves. For a smooth and proper variety $X$ with a
global vector field $\nu$, we consider the induced vector field $\nu_{g,n}$ on
the derived stack of stable maps, of genus $g$ with $n$ marked points, to $X$.
When $(g,n)$ is either $(0,2)$ or $(1,0)$, the derived stack of zeros of
$\nu_{g,n}$ defines a proper \emph{moduli of algebraic trajectories} of $\nu$.
When $(g,n)=(0,2)$ algebraic trajectories behave very much like rational
algebraic paths from one zero of $\nu$ to another, and in particular they can
be composed. This composition is represented by the usual gluing maps in
Gromov-Witten theory, and we use it give three categorical constructions, of
different categorical levels, related, in a certain sense, by
decategorification. In order to do this, in particular, we have to deal with
virtual fundamental classes of non-quasi-smooth derived stacks. When
$(g,n)=(1,0)$, zeros of $\nu_{1,0}$ might be thought as algebraic analogues of
periodic orbits of vector fields on smooth real manifolds. In particular, we
propose a Zeta function counting the zeros of $\nu_{1,0}$, that we like to
think of as an algebraic version of Ruelle's dynamical Zeta function. We
conclude the paper with a brief indication on how to extend these results to
the case of general one dimensional foliation $F$, by considering the derived
stack of $F$-equivariant stable maps.
