Defects in miRNA biogenesis or activity are associated to development abnormalities and diseases. In Drosophila, miRNAs are predominantly loaded in Argonaute-1, which they guide for silencing of target RNAs. The miRNA pathway overlaps the RNAi pathway in this organism, as miRNAs may also associate with Argonaute-2, the mediator of RNAi. We set up a gene construct in which a single inducible promoter directs the expression of the GFP protein as well as two miRNAs perfectly matching the GFP sequences. We show that self-silencing of the resulting automiG gene requires Drosha, Pasha, Dicer-1, Dicer-2 and Argonaute-2 loaded with the anti-GFP miRNAs. In contrast, self-silencing of the automiG gene does not involve Argonaute-1. Thus, automiG reports in vivo for both miRNA biogenesis and Ago-2 mediated silencing, providing a powerful biosensor to identify situations where miRNA or siRNA pathways are impaired. As a proof of concept, we used automiG as a biosensor to screen a chemical library and identified 29 molecules that strongly inhibit miRNA silencing, out of which 5 also inhibit RNAi triggered by long double-stranded RNA. Finally, the automiG sensor is also self-silenced by the anti-GFP miRNAs in HeLa cells and might be easily used to identify factors involved in miRNA biogenesis and silencing guided by perfect target complementarity in mammals.