  We define flag structures on a real three manifold M as the choice of two
complex lines on the complexified tangent space at each point of M. We suppose
that the plane field defined by the complex lines is a contact plane and
construct an adapted connection on an appropriate principal bundle. This
includes path geometries and CR structures as special cases. We prove that the
null curvature models are given by totally real submanifolds in the flag space
SL(3, C)/B, where B is the subgroup of upper triangular matrices. We also
define a global invariant which is analogous to the Chern-Simons secondary
class invariant for three manifolds with a Riemannian structure and to the
Burns-Epstein invariant in the case of CR structures. It turns out to be
constant on homotopy classes of totally real immersions in flag space.
