A measurement of the cross section for the production of top quark–antiquark pairs (tt¯) in association with a vector boson V (W or Z) in proton-proton collisions at √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 μ) channels: a same-sign dilepton analysis targeting tt¯W events, and trilepton and four-lepton analyses designed for (Formula presented.) events. In the same-sign dilepton channel, the (Formula presented.) cross section is measured as (Formula presented.), 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 (Formula presented.) cross section, (Formula presented.), 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 (Formula presented.) process is observed with a significance of 3.7 standard deviations from the combination of all three leptonic channels.