  We analyze differences in positions of active galactic nuclei between Gaia
data release 2 and VLBI and compare the significant VLBI-to-Gaia offsets in
more than 1000 objects with their jet directions. Remarkably at least 3/4 of
the significant offsets are confirmed to occur downstream or upstream the jet
representing a genuine astrophysical effect. Introducing redshift and Gaia
color into analysis can help distinguish between the contribution of the host
galaxy, jet, and accretion disk emission. We find that strong optical jet
emission at least 20-50pc long is required to explain the Gaia positions
located downstream from VLBI ones. Offsets in the upstream direction of up to 2
mas are at least partly due to the dominant impact of the accretion disk on the
Gaia coordinates and by the effects of parsec-scale radio jet. The host galaxy
was found not to play an important role in the detected offsets. BL Lacertae
object and Seyfert 2 galaxies are observationally confirmed to have a
relatively weak disk and consequently downstream offsets. The disk emission
drives upstream offsets in a significant fraction of quasars and Seyfert 1
galaxies when it dominates over the jet in the optical band. The observed
behaviour of the different AGN classes is consistent with the unified scheme
assuming varying contribution of the obscuring dusty torus and jet beaming.
