I bet they are fungal gnats.

You are growing in dirt right?

They come from the soil and are caused by over watering.

They live in the dirt until they can fly. Then they just hang out around where they came from laying more eggs. They are more of a pest then a major problem. They do live off the roots just so you know they can do damage.

Mostly they are a pain in the ass and you want to get rid of them before you harvest. You don't want bugs in your buds when you smoke them they have a tendency to pop and wreck the taste of the bud.

Gnattrol is the best thing you can get to get rid of them but it's hard to find. What ever you use you must break the life cycle so that takes weeks to do. You must keep up the pressure on them as they hatch and kill them off before they can lay more eggs. That is breaking the life cycle.