Bugs in my dirt!

Bugs in my dirt!

I was looking forward to working in my raised bed this afternoon, as it's gorgeous weather outside. I poked in the dirt and was horrified to see thousands of bugs. The adults were winged, the younger ones were white. They reminded me of termites. But termites don't live in dirt, do they? There is no sign of any type of wood damage in the lumber that frames the bed. I was hoping they were ants, but I didn't see anything that looked antlike. I couldn't get any sort of good photo of the younger ones, but here's one of Photobucket What the heck are these? And what the heck can I do to get rid of them? I raised tomatoes in this spot last year, if that makes any difference.
Is this phlox?

Is this phlox?

Jewels of Opar and Eggplant

Jewels of Opar and Eggplant

Green rose

Green rose

Plant ID

Plant ID

New and domestic!

New and domestic!

changing it up!

changing it up!