  A pivotal challenge in quantum technologies lies in reconciling long
coherence times with efficient manipulation of the quantum states of a system.
Lanthanide atoms, with their well-localized 4f electrons, emerge as a promising
solution to this dilemma if provided with a rational design for manipulation
and detection. Here we construct tailored spin structures to perform electron
spin resonance on a single lanthanide atom using a scanning tunneling
microscope. A magnetically coupled structure made of an erbium and a titanium
atom enables us to both drive the erbium's 4f electron spins and indirectly
probe them through the titanium's 3d electrons. In this coupled configuration,
the erbium spin states exhibit a five-fold increase in the spin relaxation time
and a two-fold increase in the driving efficiency compared to the 3d electron
counterparts. Our work provides a new approach to accessing highly protected
spin states, enabling their coherent control in an all-electric fashion.
