myrmecophily
Myrmecophily is the ecological association between ants (Formicidae) and other organisms. The term covers a spectrum of interactions, from mutualistic and commensal to parasitic, and can involve plants, arthropods, fungi, and microorganisms. The common thread is that ants influence or are influenced by their non-ant partners through nesting, foraging, chemical signaling, or shared resources.
In plants, myrmecophily often takes the form of myrmecophytes, species that provide nesting space and food
In other organisms, ants host a variety of specialized myrmecophiles, including beetles (notably Aleocharinae rove beetles),
Myrmecophily also occurs in insects such as certain Lycaenidae caterpillars, which secrete substances attractive to ants