  Electrides, with their excess electrons distributed in crystal cavities
playing the role of anions, exhibit a variety of unique electronic and magnetic
properties. In this work, we employ the first-principles crystal structure
prediction to identify a new prototype of A$_3$B electride in which both
interlayer spacings and intralayer vacancies provide channels to accommodate
the excess electrons in the crystal. This A$_3$B type of structure is
calculated to be thermodynamically stable for two alkaline metals oxides
(Rb$_3$O and K$_3$O). Remarkably, the unique feature of multiple types of
cavities makes the spatial arrangement of anionic electrons highly flexible via
elastic strain engineering and chemical substitution, in contrast to the
previously reported electrides characterized by a single topology of
interstitial electrons. More importantly, our first-principles calculations
reveal that Rb$_3$O is a topological Dirac nodal line semimetal, which is
induced by the Rb-$s$ $\rightarrow$ O-$p$ band inversion at the general
electronic k momentums in the Brillouin zone associated with the intersitial
electric charges. The discovery of flexible electride in combining with
topological electronic properties opens an avenue for electride design and
shows great promises in electronic device applications.
