Introduction

Endophytes are micro-organisms that live in a symbiotic relationship with plants and reside within their healthy tissues. These microbes range from prokaryotic bacteria, actinomycetes, and eukaryotic fungi to latent virus or pathogens which expresses different symbiotic lifestyles with the host plant (Schulz and Boyle, 2006; Bao and Roossinck, 2013; Wani et al. 2015). De Bary in 1886, was the first to put forth the concept of endophytes wherein he defined the endophytes as “any organism that grows within plant tissues” (de Bary, 1866). However, the definition of endophytes has been modified and reformed by different authors from time to time. Unlike various phytopathogens or mycorrhizas which cause visible morphological changes in the host plants, endophytes do not cause any symptomatic changes. They live in the inter and intracellular spaces of almost every plant organ, i.e., stem, roots, petioles, leaves, bark, seeds and latex without showing any overt symptom (Strobel and long, 1998; Kumara et al. 2014; Gunawardana et al. 2015).

They are reported from a variety of host plants, such as algae, bryophytes, pteridophytes, gymnosperms, and angiosperms (Hyde and Soytong, 2008). Of the reported 1.5 million fungi, only 100,000 fungal species have been discovered. However, Petrini (1991) suggested that approximately one million species of endophytic fungi have been estimated to exist (Hawksworth 1991; Petrini, 1991; Dreyfuss and Chapera, 1994). Also, it has been estimated that only 5% of fungal species have been studied and many fractions of the total number of species have yet to be explored (Hawksworth 1991). Nevertheless, for several years endophytes did not receive much attention, but currently, the potential of endophytes has been recognized in different sectors, like, agriculture, pharmaceutical, and biotechnology industries (Gouda et al. 2016). The evolution of fungal endophytes has been reported to be associated with the evolution of plants and it still continues to evolve inside the host plants (Krings et al. 2012).

Endophytes are known to produce various secondary metabolites, i.e., terpenoids, diterpenoids, polyketides, alkaloids, steroids, and anthraquinones (Zheng et al. 2021). In most cases, the majority of the compounds have antimicrobial properties and it is estimated that these properties include protection of the host plant from various pathogens, like bacteria, virus, fungi, nematodes, etc. (Gunatilaka 2006). The exact phenomenon with respect to the involvement of microbe or host in the production of these secondary metabolites is still not clear (Ludwig-Muller, 2019). Also, with the record elevation in the incidences of many existing and new pathogenic microbes, their recurrence and resistance towards the currently available pharmaceuticals, the clinicians are searching for alternate sources of compounds to treat such infections. The antimicrobial compounds produced by the endophytes are considered advantageous over the conventional ones as they are environment-friendly, specifically toxic to certain harmful pathogens, whereas non-toxic to humans (Singh et al. 2017). This purely endorses the use of secondary metabolites of endophytic origin as promising sources of antimicrobial compounds.

In recent years, the potential of fungal endophytes in various sectors has been evaluated globally by many researchers, still, there is a need to get more insights into the benefits conferred by them (Suryanarayanan et al. 2020). For instance, the first secondary metabolite isolated from an endophytic fungus was an anticancer diterpenoid alkaloid “taxol” which was obtained from an endophyte Taxomyces andreanae from the bark of Taxus brevifolia (Stierle et al. 1993). After the discovery of this drug of endophytic origin, the trend of studying them for obtaining novel secondary metabolites of medicinal properties took a remarkable breakthrough. Also, they have been reported to produce higher number of secondary metabolites than any other class of endophytes (Zhang et al. 2006).

In addition, recent advancements in the production of antimicrobial compounds by using CRISPR/Cas system which facilitates the production of novel classes of antimicrobial compounds viz., antibiotic enhancers, engineered antibodies, engineered phages, siderophore conjugates, photo-switchable antibiotics are also opening new ways for exploring novel antimicrobial compounds (Mantravadi et al. 2019). The recent techniques, like, nanotechnology and micro-engineering also makes it possible to cultivate the endophytic microbes which are not easy to culture from the plant (Mantravadi et al. 2019).

Classification of endophytes

The classification of endophytes has been a complex process and this continues from several years to make their definition more clear for better understanding. Initially, endophytes were divided into two distinct groups, with first group including those endophytic fungi that remain symptomless for the whole life cycle inside the host and the second group which develop some external symptoms on the host plant, such as, root nodules (Azevedo et al. 2007). As per another classification, endophytes were simply categorized into two different sub-groups, obligate endophytes and facultative endophytes (Hardoim 2008). The former were considered to be dependent solely on their host for their growth, survival and transmission whereas the latter to be administered to the host from outside environment and can also survive independent of their host (Abreu-Tarazi et al. 2010).

Endophytic fungi have also been categorized as clavicipitaceous and non-clavicipitaceous endophytes based on the range of hosts, mode of transmission, plant tissue being colonized, colonization frequency, biodiversity (high or low) and habitat and non-habitat specific functions (Rodriguez et al. 2009). Both these groups are included in four different classes, i.e., Classes 1,2,3 and 4. Class 1 type of endophytes include clavicipitaceous endophytes which are seen mainly predominant in grasses whereas other three classes are included in non-clavicipitaceous type of endophytes which are mainly predominant in non-grasses and higher vascular plants (Rodriguez et al. 2009).

According to a recent classification, endophytes are classified into two broader groups such as, systemic or true endophytes and non-systemic or transient type of endophytes depending on a range of characters, like, biology, functional diversity, taxonomy, evolution and their mode of transmission (Wani et al. 2015). Systemic type of endophytes are known to inhabit the same plant in different seasons and exhibit vertical (via seeds) mode of transmission than horizontal. On the contrary, non-systemic type of endophytes show variability in their abundance and diversity within the plant with the dynamics in external climatic conditions and exhibit a horizontal mode of transmission (Wani et al. 2015). A brief description of the common classification system of endophytes is depicted in Fig. 1.

Fig. 1
figure 1

Successive classifications of endophytes a (Azevedo et al. 2007) b (Hardoim et al. 2008) c (Rodriguez et al. 2009) d (Wani et al. 2015)

However, novel ways of classification of fungal endophytes have been adopted by different authors as per their host range, such as fungal endophytes of grasses (Tanaka et al. 2012), medicinal plants (Kaul et al. 2012), conifers (Kim et al. 2013) and mangroves (Demers et al. 2018). Similarly, based on the type of tissues being colonized, they are designated as foliar fungal, dark septate, root endophytes as well as stem/bark / seed endophytes and so on (Gakuubi et al. 2021).

Benefits conferred by the endophytes to the host plant

The maintenance of the relationship between an endophyte and the host plant has continued for several years and during this course of time, they co-evolved in the vicinity of each other which has proved beneficial to both of them (Palanichamy et al. 2018; Adeleke et al. 2019). Endophytes play an important role in the survival of their host plants by providing both direct and indirect benefits (Mattoo and Nonzom, 2021). Some of the direct benefits include:

Phytohormones production

The phytohormones produced by the endophytes are known to exhibit various morphological as well as structural changes in plants which aid in the sustainable agricultural systems (Sturz et al. 2000). For example, an endophytic fungus Cladosporium sphaerospermum isolated from Glycine max is known to produce gibberellic acid (Hamayun et al. 2009). In many cases, it has been reported that the endophytes act indirectly by expressing the genes responsible for the production of hormones in the plants (Waqas et al. 2012). It has been well exemplified by an endophytic fungus, Dietzia natronolimnaea which has been observed to modulate ABA signaling pathways in wheat to alleviate salinity stress by upregulating the genes, such as, TaABARE and TaOPRI (Ilangumaran and Smith, 2017).

Enhancement in photosynthetic activity

Endophytes are known to enhance the photosynthetic activity of many plants by increasing their chlorophyll content (Almuhayawi et al. 2021). For example, the root endophytic fungus Trichoderma is well recognized as a beneficial partner in various crop plants as it is known to upregulate certain genes of the host involved in pigment formation for photosynthesis (Harman et al. 2021). The inoculation of Trichoderma sp., in wheat has also been reported to have a role in enhancing the water uptake and photosynthetic capacity which in turn induced biomass production under salt stress (Oljira et al. 2020). Similarly, an Epichloe typhina endophytic to Dactylis glomerata improves photosynthetic efficiency by improving carbon assimilation and photochemistry of PSII (Rozpadek et al. 2015).

Siderophores production

Siderophores production by fungal endophytes prevents the plant from iron deficiency, as these compounds help in iron acquisition by the plant (Ansari et al. 2017). Numerous endophytes produce siderophores which exhibit iron-chelating properties and they indirectly compete with the pathogens for iron assimilation, thereby playing a dual role (Suman et al. 2016). For instance, many plants, such as, Cymbidium aloifolium, Triticum aestivum, and Vigna radiata have been observed to harbor many siderophores producing endophytes that not only help them in combating various phytopathogens but also promoted their growth and germination (Ripa et al. 2019; Chowdappa et al. 2020).

Nitrogen fixation

Fungal endophytes plays an important role in agriculture due to their nitrogen-fixing ability (Yang et al. 2015). For instance, an endophytic fungus Phomopsis liquidambaris increases nodulation and enhances nitrogen uptake of the host plant Arachis hypogaea L. (Xie et al. 2019). The inoculation of these beneficial endophytic fungi in crop plants increases their growth and maintenance by the acquisition of nitrogen uptake (Poveda et al. 2021). Similarly, an endophytic yeast, Rhodotorula mucilaginous which was isolated from Typha angustifolia when inoculated in rice plant promotes and increases the nitrogen content in the tissues (Paul et al. 2020). In addition, there are several similar experiments performed on different crop species for nitrogen assimilation in response to fungal endophytic inoculation (Rinu et al. 2014; Adnan et al. 2018; Christian et al. 2019; Tang et al. 2019; Wu et al. 2019).

Mineral solubilization

More than 99% of phosphorus present in the soil is non-soluble and unavailable to plants (Rodriguez and Fraga, 1999). Many studies have revealed the phosphate-solubilizing activities of diverse endophytic fungi (Nath et al. 2015; Almario et al. 2017; Rana et al. 2019). A recent study concluded that microbial inoculations in plants also help in increasing nutrients acquisition, like, P, K and Zn (Poveda et al. 2021) and organic acid concentration in root exudates which lowers the pH of the soil and assists in solubilization of these mineral nutrients (Sirohi et al. 2015). Apart from these, various experimental studies claim the importance of fungal endophytes for their host plant. Some of the recent examples of various benefits conferred by the endophytes is tabulated in Table 1.

Table 1 Benefits provided by endophytic fungi to host plants

On the other hand, the indirect benefits conferred to the plant include the following.

Biotic stress

Endophytes have been reported to perform various strategies to protect the plant from a number of biotic stresses, such as insects, pest, pathogens, and herbivores. Foliar fungal endophytes have been reported to upregulate the defense genes of the host plant which enhances the defense system of the host against various biotic stresses including pathogens and herbivores (Mejia et al. 2014). They colonize the epidermal tissues of the plant where they absorb nutrients for themselves, as well as inhibit the growth of pathogens inside the tissue and thereby induce resistance of the plant against different biotic stresses (Meena et al. 2017). They are also known to produce some toxic metabolites inside the different parts of the plant, such as, the stem, root or leaves to protect them from herbivory (Bischoff and White 2005; Saikkonen et al. 2002; Stone et al. 2004). In addition, they produce antimicrobial compounds as secondary metabolite to protect the plant from different pathogenic microbes (Mousa and Raizada2015; Zhang et al. 2015). For example, the finger millet which is considered to be resistant to pathogens inhabits Phoma sp., as an endophyte that possesses strong antifungal activities against the pathogenic strain of Fusarium graminearum (Mousa et al. 2015).

Also, reports on some entomopathogenic fungi for their use in the biocontrol of insects have gained attention (Vega et al. 2008). Certain entomopathogenic fungi have also been reported to exist as an endophytes in plants for some part of their life cycle, suchas, Beauveria, Isaria, Lecanicillium and Metarrhizium (Lughtenberg et al. 2016). These kinds of fungi after becoming endophytic help the plants to overcome biotic stresses, such as, nematodes and phytopathogens (Moraga 2020).

Abiotic stress

Fungal endophytes also helps the plants to overcome many abiotic stresses, such as, high temperature, soil salinity, oxidative stress, cold stress, heat stress, drought, phytoremediation, and so on. (Rodriguez et al. 2009; White and Torres, 2010; Waqas et al. 2012; Larriba et al. 2015; Mattoo and Nonzom, 2021). A study has revealed the inoculation of endophytic fungi Phoma glomerata and Penicillium sp., in the host cucumber helps the plant to overcome salinity and drought stress by increasing their biomass, various growth parameters and as well as assimilating the essential nutrients (K, Ca and Mg) under induced salinity and drought stress as compared to the control (Waqas et al. 2012). The most prominent mechanism observed behind this scenario is the maintenance of the osmotic gradient of the cell, cell wall elasticity and proper assimilations and translocations of compounds inside the cell (Nieves-Cordones et al. 2019). It has also been observed that the fungal endophytes can also confer thermotolerance to the host plants to alleviate heat stress (Rodriguez et al. 2008; Ismail et al. 2018).

In addition to the aforementioned abiotic stresses, endophytic fungi have also been reported to help the plant to overcome various oxidative stress, like, hydrogen peroxide, hydroxyl radicals, and superoxide anions (Sun et al. 2010; Lata et al. 2018). Similarly, they have also been reported to exhibit metal-chelating, metal sequestering as well as suitable degradation pathways which helps the plant to alleviate heavy metal-stressed habitat conditions (Aly et al. 2011). Also, reports on various fungal endophytes that assist in phytohormone production by alleviating metal stress are well established (Khan et al. 2017).

Benefits conferred by the host plant to the endophytic fungi

In this symbiotic relationship of endophytism, along with the host plant, the endophytes also obtain different advantages from this close association. As discussed earlier, these two groups have shown co-evolution over the course of time (Khare et al. 2018). Fungal endophytes are benefited from this symbiotic relationship in a number of ways which are as follows:

Nutrient absorption

Endophytes absorbs nutrients especially the carbon sources from the host, by invading the photosynthesizing tissues of the plant (Mack and Rudgers, 2008). The host plant produces various metabolites which are bio-transformed by the endophytes to further use them for their nutrition acquisition. For example, Cephalotaxus harringtonia produces glycosylated flavonoids which are bio-transformed by its endophytic fungus, Paraconiothyrium variabile (a foliar fungal endophyte) to aglycones for enhancing the growth of its germinating hypha (Tian et al. 2014). Similarly, β-1,6-glucanase enzymes produced by an endophyte Neotyphodium sp., in the apoplast of host Poa alpina at the time of infecting the host helps in their nutrient acquisition, as well as protect the plant from other infecting pathogens (Moy et al. 2002).

Shelter

The plants provide shelter to the endophytes by conferring them a range of benefits. Endophytes gets attracted towards the plant through the root exudates, such as sugars, phenolics, organic acids, and amino-acids, etc. (Mattoo and Nonzom, 2021). In addition, plants also provide protection to the beneficial endophytes in extremely dry environmental conditions, such as Epichole, Neotyphodium and Balansia which reside in the moist tissues of plants (Dutta et al. 2014). Most medicinal plants have been reported to provide shelter only to their beneficial counterparts which have the capabilities of producing various secondary metabolites by which they get benefitted in numerous ways (Rosa et al. 2010).

Low competition

In general, endophytes maintain a balanced antagonism with other endophytes inside the host tissues (Schulz et al. 2015). Thus, they face less competition than the rhizospheric and phyllospheric micro-organisms due to less number of competitors inside the host endosphere, enriched nutrients availability, optimum pH, and moisture (Backman and Sikora, 2008). In addition, they also render the plants less responsive to the other invading microbes (Christensen et al. 2002). Also, colonization of foreign endophytes is not permitted easily by the native endophytes, as they generally show envy behavior against them (Suryanarayanan et al. 2018).

Dispersion

The seeds of the plants that may harbor endophytic microbes become resistant to dehydration and various adverse environmental conditions and, thus, helps in the vertical transmission of endophytes (Truyens et al. 2013). For instance, the endophytes of ryegrass (foraging grasses) can reproduce only by infecting the seeds of the plant (Bultman and Murphy, 2000). Therefore, the propagules of the host plants have a role in the dissemination of endophytes present inside them (Schardl et al. 2004). Similarly, plants allow the dispersion of endophytes through their different parts, such as leaf surface, stem surface, or any other region for their horizontal dissemination via asexual spores (Tadych et al. 2012).

Demand for antimicrobial drugs

Resistance to the antimicrobial drug is a leading crisis worldwide (WHO, 2014). The problem of resistance of microbes against various antimicrobial drugs was well recognized about 38 years ago in Annals (Kunin 1993). This resistance has been developed due to a number of factors, like (a) misuse of medicines, (b) l long-term improper use of medicines, (c) lack of public awareness, (d) poor sanitary conditions (e) feeble immune system of people, and (f) postponement in disease diagnosis (Kunin 1983; Rice 2008). Also, horizontal gene transfer between different microbial communities has led to an increase in antimicrobial resistance in them (Thomas and Nielsen, 2005). For example, approximately 20% genome of E. coli is modified through horizontal gene transfer which renders them resistant to traditionally known antibiotic compounds (Lawrence and Ochman, 1997; Browne et al. 2020). Certain examples of microbes that are continuously developing resistance against the available drugs in the markets are Haemophilus influenza, Mycobacterium tuberculosis, Neisseria gonnorrhoea, Streptococcus pneumoniae, Salmonella and Shigella species (Seften, 2002). There are a number of antimicrobial drugs discovered from time to time but all these drugs have at least one side effect. For example., Amphotericin B, a well-used antibiotic usually in the treatment of various fungal infections show side effects, such as, acute renal failure and tubular damage (Fanos and Kataldi, 2000).

In the present scenario, the need for new antimicrobial agents is increasing due to the emergence of resistance in both plant and human pathogens (Prestinaci et al. 2015). Developing countries are mostly affected by severe diseases, like, malaria, tuberculosis every year and have witnessed an increase in the normal death rate which poses the need for using novel antimicrobials (Mohan et al. 2022). Apart from this, various fungi and yeasts, such as Aspergillus, Cryptococcus, Candida are responsible for causing several mycotic disorders (Karkowska-Kuleta, et al. 2009). Also, serious fungal infections which can be caused by chemotherapy, organ transplant, and other surgeries, like, allogenic bone marrow transplantations impose a need to use effective and safe antifungal drugs (Bhardwaj and Agrawal, 2014). In addition, antimicrobial compounds also find its way to be used as preservatives in food to prevent foodborne diseases (Liu et al. 2008). The increasing health problems are broadening issues worldwide these days and the need to find new antibiotics and therapeutic agents with less toxicity with no environmental impact and which are beneficial to mankind is increasing (Strobel and Daisy, 2003).

Recently, in the situation of COVID-19 pandemic, many patients are developing the symptoms of secondary bacterial and fungal infections (Selarka et al. 2021). However, due to insufficient time to evaluate the patients effectively for micro-biological confirmation, they are usually prescribed with antimicrobials for rapid recovery which sometimes leads to overuse or misuse by patient (Langford et al. 2021). Patients, in some cases, are using antimicrobials continuously without having any serious infection which in turn leads to the development of resistance against antimicrobials (Lansbury et al. 2020; Rawson et al. 2020). To deal with this problem of drug resistance, one should minimize the rate of acquisition of drugs and use appropriate measures to lessen the spread of the disease. In spite of the introduction of many new antimicrobials against these micro-organisms, they are posing major threats to living organisms due to their evolutionary efficient mechanisms to overcome the effect of these antimicrobials over time (Lowy 2003).

The production of antimicrobial compounds has faced numerous problems over the years like, (a) the non-availability of commercial bioactive secondary metabolites, sources of derivation are slow-growing medicinal plants or rare plant species (c) even sometimes the synthesis of the bioactive secondary metabolite is very expensive or (d) its high complexity or molecular weight (Rustamova et al. 2020). To deal with these problems medicinal plants are continuously being used in large quantities for producing desired drugs which, however, leads to a decrease in their population. Therefore, alternatives such as endophytes (bacteria or fungi) can be employed for this purpose. As discussed earlier, paclitaxel a rare and important bioactive compound obtained from an endophytic fungus Taxomyces andreanae provides an alternative method for producing this costly drug without using the host plant (Stierle et al. 1993). This will, however, reduce our reliance on slow-growing medicinal plants for medicinal drugs and also helps in preserving our declining biodiversity. These drugs of microbial origin are less costly, time-saving, and more economical, thus making them a worthy choice from the pharmaceutical perspective (Strobel and Daisy, 2003).

As discussed earlier, endophytes are known to produce secondary metabolites similar to their host and this mimicking ability is a leading perspective for the development of desired drugs (Zhang et al. 2006). Some of the drugs produced by them are widely used nowadays well exemplified by taxol, camptothecin, podophyllotoxin, vinblastine, vincristine, azadirachtin, hypericin, diosgenin and rhitukine (Sachin et al. 2013; Nicoletti and Fiorentino, 2015). Some of the well-known antimicrobial compounds produced by the fungal endophytes similar to their host plant are given in Table 2. Also, the employment of endophytes as an alternative antimicrobial production can be attributed to the diverse advantages, like, faster growth rate than medicinal plants, fermentation potential, easy nutrient availability, host-mimicking compounds production, and enhanced antimicrobial potential than plants. Thus, fungal endophytes provide a safe alternative way to produce novel antimicrobial compounds in high quantities to deal with this situation (Yu et al. 2010; Kumar et al. 2014).

Table 2 Antimicrobial compounds mimicked by the reported fungal endophytes

Genes responsible for antimicrobial production

As per the earlier studies, it was proposed that genes responsible for the production of secondary metabolites are scattered in the whole genome of the microbe, like the genes of primary metabolite production in fungi (Hoffmeister and Keller 2007). Later, it was found that genes responsible for antimicrobial production are present in clusters, i.e., polyketide synthase (PKS) and non-ribosomal peptide synthase (NRPS) found in extra-chromosomal material or plasmid of the endophytic fungi that synthesize polyketides and oligopeptides associated with antimicrobial activities (Brakhage and Schroeckh, 2011; Sachin et al. 2013; Mishra et al., 2017).

According to Keller et al. (2005), fungi produce secondary metabolites with the help of a few precursors which result from the primary metabolic pathways (Keller et al. 2005). Endophytic fungi produce various classes of antimicrobial compounds, such as alkaloids, polyketides, terpenoids, phenylpropanoids, peptides, and aliphatic compounds (Mousa and Raizada, 2013). The ability of the endophytes to produce host-based secondary metabolites shows that there is possibility of the existence of various complex cross-talks between the host plant and endophytes at the gene level. The evolutionary studies and the inability of endophytic fungi to produce secondary metabolites in subculturing (either due to loss of extra-chromosomal material acquired from the host plant or silencing of genes in the absence of host) supports the possibility of host-based secondary metabolites production (Kumara et al. 2014).

The horizontal gene transfer i.e., the transmission of genetic material among different organisms is observed in bacteria, fungi, and other eukaryotic organisms (Bansal and Meyer et al. 2002; Vos et al. 2015). Although, this can be an efficient reason for the production of host-origin secondary metabolites in endophytes due to their co-evolution over millions of years (Venieraki et al. 2017). As discussed earlier, genetic studies on antimicrobial production in fungal endophytes revealed that the genes responsible are present on the chromosomes in clusters (Mousa and Raizada, 2013). According to Bielecka et al. (2022) the transfer of these gene clusters from the host plant to endophytic fungi leads to the production of novel and versatile compounds (Bielecka et al. 2022). Similarly, the production of similar secondary metabolites by different fungal endophytes belonging to different plants (brefeldin A, paclitaxel and echinocandin) also facilitates the hypothesis of horizontal gene transfer between different fungal endophytes during the evolutionary process (Mousa and Raizada, 2013).

Although, the biosynthetic gene clusters present in the endophytic fungi are present in insufficient amounts, the secondary metabolites produced by fungal strains are not produced in accordance with it (Rashmi and Venkateswara Sarma 2019). There are a number of ways for enhancing the metabolite production by endophytic fungi in cultural conditions outside their host such as, (1) by changing the cultivation parameters (constituents of the medium used, aeration condition, enzyme inhibitors being used, cultural vessels, etc.) of secondary metabolite production (2) co-culturing (co-cultivation or mixed fermentation) (3) by use of epigenetic modifiers (DNA methyltransferases inhibitors and histone deacetylases inhibitors) and various molecular approaches (genetic engineering, manipulation of negatively regulatory genes, overexpression of positively regulatory genes) (Yu et al. 2010; Gakuubi et al. 2021). For example, overexpression of ε-PL synthetase genes in fungal endophyte Epichloe festucae of the host plant Lolium perenne (perennial ryegrass) results in the enhanced production of an antifungal compound ε-poly-l-lysine (Purev et al. 2020). Similarly, several new techniques, like, CRISPR–Cas application is being employed nowadays to enhance the bioactive potential of fungal endophytes (Yan et al. 2018).

As per the studies by many researchers, the shikimic or enzymatic pathways are also involved in the synthesis of secondary metabolites in endophytic fungi (Aharwal et al. 2021). On the other hand, various studies on genome sequencing indicate that the genes responsible for the production of similar secondary metabolites in the host and their respective endophytes not the same (Mattoo and Nonzom et al. 2021). This, however, makes their evolution independent of their host. For example, Taxol is produced by Taxus sp. as well by its endophyte Taxomyces andreaneae, but both producers did not show any sequence homology with respect to each other (Heinig et al. 2013). Similarly, a defensin molecule is known to be produced by the plant, Picea glauca, but later it was found that this defensin molecule (endopiceasin) was originally produced by one of its endophytic fungi (Mygind et al. 2005; Picart et al. 2012). This may be due to cross-activation of genes by common precursors between the plant and its endophytes during stress (Khare et al. 2018).

There are also evidence of duplication of the whole gene cluster for antimicrobial production in endophytes (Mousa and Raizada, 2015). For example, Neotyphodium uncinatum encodes two duplicate clusters of genes (LOL-1 and LOL-2) responsible for loline (alkaloid) production (Spiering et al. 2005). However, much clarification is needed to understand the genetic involvement and different pathways in antimicrobial production by endophytes. Likewise, to understand the potential of biosynthetic gene clusters of endophytic fungi, it is imperative to follow multi-dimensional approaches, such as, bioinformatics, chemical characterization, molecular approach, the study of physical environment effects on metabolite production and omics (Rashmi and Venkateswara Sarma 2019).

Endophytic fungi: an enriched source of antimicrobial compounds

There are numerous micro-organisms associated with plants that are known to produce compounds with antimicrobial properties (Raaijmakers and Mazzola, 2012). Endophytes as a beneficial partners provide multiple rewards to the host plants especially the production of antimicrobial compounds to protect them from various pathogens (Rodrigo et al. 2022). This property of endophytes in protection is increasingly used in healthy crop production (Dong et al. 2021). They show antagonistic behavior against different pathogens to protect their host. For example, fungal endophytes, such as Trichoderma atroviride, Metarhizium anisopliae and Hypoxylon rubiginosum exhibit antifungal activities against phytopathogens Diplodia pinea, Fusarium graminearum and Hymenosciphus fraxineus, respectively (Santamaria et al. 2012; Halecker et al. 2020; Hao et al. 2021). This potential for the production of antimicrobial metabolites of endophytic fungi leads to its effective utilization in agriculture and pharmaceutical industries, for the production of novel drugs (Sudha et al. 2016; Farhat et al. 2019). There are some antimicrobial compounds, such as, atenusin, ambuic acid, cryptocin, dihydroxycadalene, nodulosporins, phomenone and trichodermin produced by the fungal endophytes that are considered to have an important role in the protection of the plant against various phytopathogens (Kaul et al. 2012; Chen et al. 2014). More than 300 endophytes have been successfully isolated and cultured in laboratory conditions for the production of secondary metabolites of therapeutic importance in the past 5 years (Patil et al. 2016).

Antimicrobial compounds originally are the natural organic compounds of low molecular weight produced by various microbes and exhibit the property of killing other micro-organisms under their influence (Guo et al. 2000). Their production of secondary metabolites with antioxidant and antimicrobial properties have been discovered in the past two decades (Bhardawaj et al. 2015). The secondary metabolites produced by medicinal plants are being used in pharmaceutical sectors since time immemorial (Hamid and Aiyelaagbe, 2011). Similarly, fungal endophytes obtained from these medicinal plants also act as an alternative source of production of nearly half of the identified bioactive compounds (Supaphon et al. 2013).

In this world of ever-increasing human population, a large number of antimicrobial drugs are already discovered, but still, there is a need to find out new therapeutic agents due to the emergence of resistant varieties (Karam et al. 2016). Fungal endophytes are known to produce a diverse range of bioactive compounds which have been used in the pharmaceuticals and pesticide industries (Rodriguez et al. 2000; Onifade 2007). They are studied for their capability of producing antimicrobial compounds in vitro and the results are sometimes even better than the plant itself with exceptionally enhanced antimicrobial potential (Arora and Kour, 2019).

It is estimated that out of 22,500 microbes derived metabolic compounds including antibiotics, fungi constitute a large population (approximately 38%) to produce these compounds (Berdy et al. 2005). The antimicrobial compounds obtained from endophytes belong to different classes, such as, alkaloids, aliphatics, phenolics, polyketides, terpenoides, peptides and various nitrogeneous compounds (Mousa et al. 2013). The wide range of antimicrobial compounds which are produced by the host as well as their endophytic partners is enormous (Gakuubi et al. 2021). The ability of the endophytes to produce similar antimicrobial compounds produced by their host will also help to utilize the rare or endangered plants in a very convenient way (Sharma et al. 2021).

The demand for fungal endophytes has increased after realizing their potential for producing anticancer compounds, like, taxol and camptothecin due to the scarcity of natural plant sources (Gupta et al. 2020). There are a number of drugs available in the market which are of endophytic origin with reference to fungal endophytes. These drugs are commercially available in the market after several trials and costs million or billion dollars, such as, Piperine (antimicrobial), Podophyllotoxin (anticancer), Vinblastine (anticancer), Vincristine (anticancer), Griseofulvin (antioxidant), Rohitukine (anticancer), Huperzine A (antimicrobial, cholinesterase inhibitor), Altersolanol (Antiangiogenic), Quinine (antimalarial agent) and so on. These important compounds are being utilized in pharmaceutical industries as an alternative source of medicine rather than using the important medicinal plant itself (Tiwari and Bae, 2022). A detailed study on the action of antimicrobial compounds obtained from endophytic fungi revealed their involvement in the impairment of nucleic acid metabolism; enzyme synthesis blockage; disturbance in DNA or RNA synthesis repair system and inhibition of protein synthesis (Samanta et al. 2021; Silva et al. 2022).

Recently, a new aliphatic compound, Kheiric acid was isolated from an endophytic fungus Curvularia papendorfii inhabiting Vernonia amygdalina which was found active against methicillin-resistant Staphylococcus aureus (MRSA) (Khiralla et al. 2020). Similarly, a new enamide dimer, Phomoenamide (an antifungal compound) was produced by a Phomopsis sp. isolated as an endophytic fungus from the healthy leaves of Garcinia dulcis (Rukachaisirikul et al. 2008). A new polyketide, named Talafun was also isolated from a fungal endophyte, Talaromyces funiculosus from Salicornia bigelovii and exhibited great antibacterial potential against E. coli (Guo et al. 2016). Likewise, two new sesquiterpene derivatives, trichocadinin B and trichocadinin D produced by Trichoderma virens isolated from Artemisia argyi having antibacterial activities against P. aeruginosa, Aeromonas hydrophila, E. coli, Vibrio harveyi and V. parahaemolyticus (Shi et al. 2019). Some of the important antimicrobial compounds and their mode of action against pathogenic microbes are discussed below:

Sordaricin

It is one of the potent antifungal compounds which was first isolated from Xylaria sp. endophytic to the plant Garcinia dulcis that exhibited great activity against Candida ablicans (Pongcharoen et al. 2008). The mechanism involved the process of inhibition of ribosomal translocation with mRNA to prevent polypeptide chain synthesis by stabilizing the EF2/ribosome complex (Liang 2008).

Piperine

Piperine is a well-known compound with a number of properties including antimicrobial and was first produced by Piper longum. However, research in endophytic metabolite production leads to the discovery of this host-mimicking compound by one of its endophytes, Periconia sp. in the liquid fermentation broth. This was the first report of piperine production by an endophyte. It was found active against Mycobacterium smegmatis and M. tuberculosis (Verma et al. 2011). The mechanism behind this involved the inhibition of an efflux pump of M. tuberculosis (Sharma et al. 2010).

Phomopsichalasin

It is an antimicrobial cytochalasin of the alkaloid group first reported as a novel antimicrobial compound from an endophyte Phomopsis sp. inhabiting the twigs of Salix gracilistyla var. melanostachys (Horn et al. 1995). It binds to the actin filament to block its polymerization and exhibits great antimicrobial potential against various human pathogenic bacteria, such as Pseudomonas sp., Salmonella galinarum, Staphylococcus aureus and Bacillus subtilis and yeast Candida tropicalis (Binder, and Tamm, 1973; Zhou et al. 2009).

Hypericin

It is an antimicrobial compound earlier reported to be produced by the plant Hypericum perforatum L. Later it was also produced by its endophytic fungus, Chaetomium globosum for the first time and found active against both pathogenic bacteria and fungi, such as E. coli, Klebsiella pneumoniae, P. aeruginosa, S. aureus subspecies aureus, Aspergillus niger and Candida albicans (Kusari et al. 2008). Hypericin reduces the expression of Staphylococcal accessory regulator A (SarA), which is a global virulence regulator, and decreases resistance in methicillin-resistant Staphylococcus aureus (MRSA) against β-lactam antibiotic which plays an important role in the treatment of MRSA (Wang et al. 2019). Similar antimicrobial compounds produced by different endophytes in the past years are presented in Table 3.

Table 3 Antimicrobial compounds produced by endophytic fungi of different plants, and their bioactivities

Nanoparticles as antimicrobial agents

Nanotechnology is an approach of using nanoparticles with sizes ranging from 10 to 100 nm (Allaker et al. 2010). Nanoparticles are classified into different groups, such as, metal, carbon, polymeric, ceramic-based nanoparticles, and so on (Khan et al. 2019). They are used in various fields, such as, electronics, cosmetics, pharmaceutical, manufacturing and construction (Mohajerani et al. 2019). They have also been focused for their utilization in different aspects, such as drug delivery and diagnosis of disease against microbial infections (Singh et al. 2013). Nanoparticles also find their application in various pharmaceutical industries, such as, in the treatment of cancers in humans or in novel methods of drug delivery (Kapil et al. 2014; Hosseini et al. 2016).

Synthesis of nanoparticles using micro-organisms is an imperative branch of nanotechnology (Shankar et al. 2003). The nanoparticles are synthesized by different physical, chemical, or biological methods (Messaoudi and Bendahou, 2020). The biological methods (use of living organisms, such as plant, seaweeds, and micro-organisms) are more beneficial than physical or chemical methods, which produce toxic chemicals in the environment (Patra and Baek 2014). This method is eco-friendly, non-toxic, cost-effective, and beneficial in the large-scale production of nanoparticles (Singh et al. 2017). The nanoparticles produced by micro-organisms are characterized by their wavelength range (200–800 nm), morphology (scanning electron microscopy and transmission electron microscopy), chemical structure (using X-Ray diffraction method), and functional groups (Fourier transform infrared spectroscopy) (Messaoudi and Bendahou, 2020). Numerous micro-organisms are known to produce nanoparticles, such as, algae, fungi, and bacteria (Khalil et al. 2018). These are being used nowadays due to their potential of reducing metals into nanoparticle sizes and also to reduce the dependency on plants (Staniek et al. 2008).

Recently, the endophytes are gaining attention for their potential of producing different nanoparticles of therapeutic importance (Rahman et al. 2019). They have been able to produce different nanoparticles, such as silver, gold, copper, zinc, etc. which are used in pharmaceutical industries (Kulkarni and Ramakrishna 2020; Mani et al. 2021). According to Rahman et al. (2019), the silver nanoparticles produced by endophytes have various properties, such as antimicrobial, seed germination, anticancer, antioxidant activity, potent bactericidal activities, photocatalytic degradation of dyes, in food packaging and various agricultural applications as depicted in Fig. 2 (Rahman et al. 2019; Mustapha et al. 2022). A number of researchers have reported them as valuable tools against various antibiotic resistance Gram-positive as well as Gram-negative bacteria (Liu et al. 2015). The nanoparticles produced by endophytic fungi are considered to be more stable as they can produce proteins and biomolecules which prevent their agglomeration (Netala et al. 2016). The biosynthesis of nanoparticles from endophytes is considered a novel approach with immense potential in drug formulations (Messaoudi and Bendahou, 2020). The diversity of antimicrobial nanoparticles from endophytic fungi has been summarized in Table 4.

Fig. 2
figure 2

Production of nanoparticles by endophytic fungi and its various applications

Table 4 Antimicrobial nanoparticles produced from endophytic fungi

Fungal endophytes as a source of antiviral agents

Viruses are acellular micro-organisms, considered living (inside the host) or non-living (outside the host) depending on the availability of the host. Viral infections often cause serious issues at the global level resulting in outbreaks, epidemics, and pandemics, the most recent being the SARS-CoV-2. However, with time evolution, they get evolved into more resistant varieties, thus raising the need to explore and formulate novel therapeutic agents against them (Saxena et al. 2021).

Fungal endophytes as a source of the antiviral have has been considered as a new approach towards its therapeutic importance. It has been reported that endophytes produce antiviral drugs in response to biotic stress inside the host against the virus. For example, an endophytic fungus Cytonaema sp. isolated from an unidentified host was reported to produce two novel antiviral compounds, viz., cytogenic acids A and B, the inhibitors of human cytomegalovirus (hCMV) protease (Guo et al. 2000). Another antiviral compound, Hinnuloquinone isolated from an endophytic fungus, Nodulisporium hinnuleum, inhabiting the leaves of Quercus coccifera was observed active against human immunodeficiency virus type 1 protease (HIV-1) (Singh et al. 2004). Similarly, Emerimidine A and B were isolated from the endophytic fungus Emericella sp. which exhibited moderate activity against Influenza virus H1 N1 (Zhang et al. 2011).

Another novel antiviral compound 7-dehydroxyl-zinniol was isolated from an endophytic isolate, Alternaria solani from the roots of Aconitum transsectum that exhibited moderate activity against hepatitis B virus (Ai et al. 2012). Also, different types of Altertoxins, for example, altertoxin I, II, III, and V have been reported to be produced by Alternaria tenuissima endophytic to the stem of Quercus emoryi that inhibited the growth of HIV virus at different concentrations. Quantitative Structural Activity Relationships (QSAR) studies have been carried out on these compounds to check their potential as antiviral agents (Bashyal et al. 2014). Similarly, alternariol and alternariol-9-methyl ether produced by A. alternata endophytic to the peel of Punica granatum also exhibited potent activity against HCV NS3/4a protease (El-Kassem et al. 2019). The various antiviral compounds isolated from fungal endophytes illustrated above are given with their chemical structure in Fig. 3.

Fig. 3
figure 3

Antiviral compounds isolated from fungal endophytes

Inhibition of biofilm production by endophytic fungi

Biofilm formation is a complex process involving a large number of bacteria (Ahmad et al. 2020). This is a method of protection in both plants and animals to protect themselves from host defense systems and antimicrobial compounds. Although biofilms are well studied in the case of bacterial pathogen but are poorly studied in the development and structure of filamentous fungi, as well as their role in pathogenicity (Shay et al. 2022). The antimicrobial compounds are effective against free-living bacteria or micro-organisms, but bacterial species most commonly prefer to grow by biofilm formation in natural conditions which hinders their proper killing (Qvortrup, et al. 2019).

In most of the developed countries, it is seen that more than 80% of microbial infections are caused by biofilm formation only. Human skin, dental plaque, and gut represent biofilm formation's most common site (Qvortrup et al. 2019). To eradicate this serious infection, many natural compounds have been introduced or are utilized in pharmaceutical industries. Various phytochemicals, such as phenolics, essential oils, terpenoids, lectins, alkaloids, polypeptides, and polyacetylenes have been reported to possess antibiofilm properties (Yong et al. 2019). Secondary metabolites of endophytic origin have also been reported to be a source of natural compounds that help eradicate biofilm formation by these micro-organisms (Caruso et al. 2022).

Similarly, quorum sensing (ability to detect cell population) is one of the probable mechanisms exhibited by bacteria which is responsible for biofilm formation. Therefore, quorum-quenching compounds for breaking the quorum-sensing ability of these microbes are needed to break the chain of biofilm formation. Several endophytic fungi have been shown to exhibit the potential of secreting quorum-quenching compounds. There are a number of strategies to fight against quorum-sensing molecules, such as inhibition of QS signal biosynthesis, inhibition of QS signal detection, degradation and inactivation of QS signals, and use of antibiotics as QS inhibitors (LaSarre and Federle 2013). For example, Alternaria alternata endophytic to Carica papaya exhibited the quorum-quenching ability in its crude extract form and inhibit the quorum-sensing ability of Pseudomonas aeruginosa. The extract is known to exhibit the inhibition potential of biofilm formation up to 65.2% and the mechanism involved is the inhibition of the production of exopolysaccharide and cell surface hydrophobicity which greatly explained the endophytic potential in the treatment of biofilm formation (Rashmi et al. 2018).

Also, Fusarium graminearum and Lasiodiplodia sp. isolated from Ventilago madraspatana produced quorum-quenching molecule as a secondary metabolite that inhibited the quorum-sensing phenomenon of the pathogens (Rajesh and Ravishanker Rai et al. 2013). Similarly, exudates of an endophytic fungus (Penicillium restrictum) isolated from Silybum marianum contain polyhydroxyanthraquinones as quorum-sensing inhibitors, and these metabolites were found to be active against the growth of methicillin-resistantt Staphylococcus aureus (MRSA) strain by inhibiting its peptide and delta toxin production (Figueroa et al. 2014). Another species, Penicillium citrinum isolated from a halophyte, Halocnemum strobilaceum as endophyte produced a known compound,1,3,6-trihydroxy-7-methoxy-9H-xanthen-9-one that exhibited 100% efficiency in inhibiting the biofilm formation by Pseudomonas aeruginosa (Abdel Razek et al. 2020).

Similarly, the activity of an aromatic butyrolactone, flavipesin A, isolated from an endophytic fungus Aspergillus flavipes belonging to a mangrove host Acanthus ilicifolius, resulted in the disruption of the biofilm of S. aureus (Bai et al. 2014). In another instance, Alternaria destruens isolated from the healthy tissues of Calotropis gigantea exhibited an alpha-glucosidase inhibitor potential of 93.4%. The further purification of ethyl acetate extract of the fungus displayed two active fractions AF1 and AF2 which upon analysis found active against biofilm formation by various tested pathogens, such as P. aeruginosa and C. albicans whereas the other active fraction AF2 exhibited maximum inhibition of biofilm formation by C. albicans and S. enterica (Kaur et al. 2020).

Conclusion and future perspectives

In today’s scenario, resistance against available drugs is considered one of the major problems associated with microbes. Despite many discoveries on antimicrobial compounds, more resistant varieties have evolved. An effective antimicrobial compound should have good fungicidal or bactericidal activities. Novel antimicrobials from different alternative sources, like, endophytes can help in treating serious diseases, like, typhoid, tetanus, cholera, pneumonia, candidiasis, and aspergillosis which are diseases of concern. Despite various available drugs, the discovery of new drugs is still a challenge either due to (a) the appearance of continuous resistance in pathogenic microbes, (b) the occurrence of novel diseases, like, SARS-COV 2, (c) associated side effects (d) constant recurrence of many diseases and (e) unavailability of sources for drug discovery. Endophytes on the other hand provide an efficient way of drugs production due to various factors, such as (a) emerging resistance varieties for discovering new drug targets, (b) source of obtaining drugs, (c) minimizing the burden on medicinal plants, (d) to compensate expensive drug delivery, (e) to obtain greater variety of drugs, (f) fermentation potential and reproducibility of endophytes, (g) faster growth rate and (h) easily available nutrients, (i) host-mimicking compound potential, (j) enhanced antimicrobial potential than plants and (k) their balanced symbiotic relationship with different endophytic microbes.

To better understand the role and benefits of fungal endophytes and their relationship with the host plant, it is imperative to study modern-based approaches, like, nanotechnology (production of antimicrobial nanoparticles from endophytes), metabolomic profiling, next-generation sequencing, metabolomics, proteomics, metagenomics, bioinformatics, and molecular networking approaches. These modern techniques are helpful in studying and characterizing the structural analysis of a wide range of molecules in extract efficiently. Isolation and purification of bioactive compounds from medicinal plants is an expensive and laborious process that involves the use of various plant parts in large quantities. Therefore, it is advantageous to shift from medicinal plants to fungal endophytes for isolating various plant-mimicking compounds as well as plant-independent bioactive compounds produced by them. There is also a possibility for increased production of these compounds by involving the fermentation potential of endophytic fungi which can be progressed on a large scale. However, more explorations of medicinal plants are required to search for more novel drugs with antimicrobial potential. Moreover, studies on the genetic and molecular basis have to be focused on for a better understanding of various interactions involved between endophyte and the host plant for antimicrobial production.