A measurement of the cross section for the production of top quark-antiquark pairs (t (t) over bar) in association with a vector boson V (W or Z) in proton-proton collisions at root s = 8 TeV is presented. The results are based on a dataset corresponding to an integrated luminosity of 19.5 fb(-1) recorded with the CMS detector at the LHC. The measurement is performed in three leptonic (e and mu) channels: a same-sign dilepton analysis targeting t (t) over barW events, and trilepton and four-lepton analyses designed for t (t) over barZ events. In the same-sign dilepton channel, the t (t) over barW cross section is measured as sigma(t (t) over barW) = 170(-80)(+90) (stat) +/- 70 (syst) fb, corresponding to a significance of 1.6 standard deviations over the background-only hypothesis. Combining the trilepton and four-lepton channels, a direct measurement of the t (t) over barZ cross section, sigma(t (t) over barZ) = 200(-70)(+80) (stat)(-30)(+40) (syst)fb(-1), is obtained with a significance of 3.1 standard deviations. The measured cross sections are compatible with standard model predictions within their experimental uncertainties. The inclusive t (t) over barV process is observed with a significance of 3.7 standard deviations from the combination of all three leptonic channels.