Events containing one or more top quarks produced with additional prompt leptons are used to search for new physics within the framework of an effective field theory (EFT). The data correspond to an integrated luminosity of 41.5 fb(-1) of proton-proton collisions at a center-of-mass energy of 13 TeV at the LHC, collected by the CMS experiment in 2017. The selected events are required to have either two leptons with the same charge or more than two leptons; jets, including identified bottom quark jets, are also required, and the selected events are divided into categories based on the multiplicities of these objects. Sixteen dimension-six operators that can affect processes involving top quarks produced with additional charged leptons are considered in this analysis. Constructed to target EFT effects directly, the analysis applies a novel approach in which the observed yields are parameterized in terms of the Wilson coefficients (WCs) of the EFT operators. A simultaneous fit of the 16 WCs to the data is performed and two standard deviation confidence intervals for the WCs are extracted; the standard model expectations for the WC values are within these intervals for all of the WCs probed.