Agroecology as a science and Biomathematics provide elements that support precision in agroecological designs. The present study was conducted in 10 agroecosystems in Nicaragua located in five departments (Chinandega, Carazo, Matagalpa, Estelí and Boaco). These sites present diversified systems with crops (corn, rice, beans, coffee), forest and cattle. 250 samples of microorganisms and 250 samples of macrofauna were collected and taken to the Laboratories of the National Agrarian University of Nicaragua. The results obtained describe an abundance of 2084 and a richness of 123 families in macrofauna in interaction with 19 genera of microorganisms. The design of 3D pyramidal graphs represented the functional biological interaction on the x, y, z axes between macrofauna families and genera of microorganisms. The design of the Tau index (τ) equation and the obtained values allow us to elucidate the coexistence between organisms. The 20 most significant macrofauna families with their respective positive Tau indices were: Lumbricidae (3.864), Rhinotermitidae (2.486), Acanthodrilidae (0.706), Agelenidae (0.265), Styloniscidae (0.247), Armadillidae (0.208), Porcellionidae (0.19), Polydesmidae (0.178), Histeridae (0.173) and Mycetophilidae (0.168). The families with negative Tau index were: Formicidae (-1.953), Scarabaeidae (-1.438), Chrysomelidae (-0.173), Ixodidae (-0.166), Elateridae (-0.125), Noctuidae (-0.125), Gryllidae (-0.105), Tettigoniidae (-0.74), Culicidae (-0.71) and Cicadidae (-0.05). The genera of microorganisms were: Aspergillus sp., Aureobasidium sp., Bacillus sp., Candida sp., Fusarium sp., Gliocladium sp., Macrophomina sp., Mucor sp., Paecilomyces sp., Penicillium sp., Pseudomonas sp., Pythium sp., Rhizoctonia sp., Rhizopus sp., Sarcina sp., Streptomyces sp., Torula sp., Trichoderma sp. and Verticillium sp. The Lumbricidae family reached the highest interaction in the 3D graphs and the best values of the Tau index. The functional biological diversity of species is irreplaceable by synthetic means. Synergistic actions should be promoted to increase populations of macrofauna that guarantee the coexistence of beneficial microorganisms for the design of agroecosystems with precise biological interactions.