What is this small, black, flying bug?
This is a type of wasp. It is most likely a parasitoid which is a insect that attacks other insects (biological control species). I cannot give to you an exact identification, but it is of no concern to human health, it does not sting and they are considered beneficial. They may have been associated with a caterpillar that they killed somewhere around the window frame.