Ants seem to like yard long beans, or at least the blossoms the beans come from. These are kind of cool looking beans anyway, they grow in pairs. And on almost every plant, at the point where those two beans meet, you will find ants. They don’t seem to hurt anything. Trust me– I’ve been harvesting lots of beans.
I just spent some time searching online to see if I could learn more about what’s happening here, but for once, my favorite websites came up short. The main info I found was from other gardeners basically saying the same thing as above.