Ants are largely overlooked by gardeners despite being the most common insect (by number). Part of the reason gardeners don't appreciate ants is likely because they are generalist foragers. So it doesn't matter a whole lot what plants are growing in a garden, native or non; if you have soil and dead wood, chances are ants live in your yard.
They play a vital role in removing dead insects. So after those big pretty swallowtail butterflies are done laying their eggs and visiting the flowers in your garden, ants are more than happy to collect, dissect, and consume their expired carcass. Though on the other hand, ants are also happy to remove butterfly eggs from host plants and often kill early instars to a lot of species. Ants don't forage equally on certain plants though, so it can depend on what's nesting near the tree/plant. Many caterpillars have defenses against ants too, but they're not always effective.
I have a Hackberry sapling that's about as tall as me right now. My dream is to someday see some Hackberry Emperors using it as a host plant. Every year though I got out there and find ants (Lasius alienus, Camponotus pennsylvanicus, C. chromaiodes, C. nearcticus, C. subarbatus, Temnothorax curvispinosus and Nylanderia faisonensis) foraging on the tree. They're mostly doing what's called nectar scraping where they wonder the plant licking and scraping the surface of the leaves to collect the small amounts of sweet sap that bleeds out of the leaves with the changing temperature of the day. The foraging power of 1 ant colony is enough to put a dent in the number of Lepidoptera eggs on a sapling; this one has 7 different species and likely multiple colonies of each constantly foraging on it, so I won't likely be seeing any Hackberry Emperors for several years.
To a lesser degree, ants also think pollinators are delicious. They're mostly an issue with solitary bees, usually ground nesting or mason bee nests when discovered by ants. Ants typically don't dig into structures in search of food though, so as long as the burrows or tubes are properly secured with mud the developing bee larva should be safe.
My favorite thing ants do in the garden is called Myrmecochory, or ant plant seed dispersal. Even here though ants can be considered annoying. Let's say you paid $20 for a rare Trillium species, looking to start a clump of them over the next decade, which is how long many Trilliums take to flower from seed. Often though Trillium seeds have the annoying habit of walking away from the plant thanks to packets of "Elaiosome," a lipid rich substance on the seed, attracting ants to come and carry them home.
This is Trillium vaseyi, (I believe), which is pollinated by Vinegar Flies and other sorts of carrion insects. Note Vinegar Flies are sold in pet stores as "Fruit Flies" because that sounds better than Vinegar Flies. True Fruit Flies consume fresh fruit and tune delicious apples and berries into balls of maggots. Vinegar Flies target foods that have already spoiled, drawn in by the fermenting smell of yest, cider and dead fish, which is what this flower smell like.
Trillium grandiflorum! This is by far the most common and easily recognized Trillium species. It's pollinated by bees and while I never witnessed any bees visiting my flowers I have seen honeybees visiting them in other gardens when planted in sufficient numbers. I'm certain Bumblebees and others must visit them on occasion too. Currently I have a clump of about 9 plants of flowering age. Each of which has a few off shoots underneath that will reach flowering age in years to come. I may even need to divide a few in a year or two.
Admittedly things like Twinleaf, Violets, Blood Root, Hepatica, Woodland Poppy, and Bleeding Hearts have already dropped their seeds for ants to disperse. Trilliums are latest ephemeral plant in North America to drop their seeds as many of the ones I've mentioned are already dormant.
Note how the leaves to the plants photoed above are singed at the tips. If you don't water your plants, they will fry right up and abort the seedpod entirely. You can plant Trilliums in full sun and they'll grow happily but probably won't produce seeds because of how much sun they get. You can compensate for this by adding water but there's only so much watering can do. It's best to plant them in the shade with a small amount of mulch and a low ground cover growing underneath such as Hepatica or Stone Crop. I like to water the roots to mine basically every time I walk past with the hose, or once every other day. Just put the water to the stem and count to 10 for each plant. Even doing this though won't guarantee success. Note the plant to the left didn't bother producing a seedpod at all. Of 9 plants only 2 didn't make seedpods, lack of pollination is likely the issue. Some that did make seedpods made smaller than average ones.
You can tell a Trillium pod is ripe when you can see the seeds right through the pod. Another thing to look for is a change in color. Some go from green to purple, others go from purple to green, some ends up as bright red, depending on the species. Seeing these changes, and especially seeing the seeds within, mean you're within 2 weeks of the seeds being ripe. Seeds should be hard, like unpopped popcorn. The longer you wait the more likely the pod will become damaged, where ants, wasps, birds, and rodents will make off with the seeds. I've found seedpods completely hollow inside thanks to a small puncture hole allowing ants to gain entry.
Ants planting the seeds is not necessary for germination! This is just how the plants disperse their seeds in the wild. For gardeners looking to start a bed of these, I'd say go ahead and crack open a pod or two and just dump the seeds out in a shallow ditch and plant them yourself. Ideally the elaiosome should be removed before doing this, however that stuff is really effing on there!!! You can't just cut it off or take your finger nail to it. The risk is sometimes a kind of mold or fungus grows on the elaiosome and may kill the seed... I've never seen this happen to an extreme degree though. Maybe let the seeds dry out for two hours before planting.
Personally I like letting the ants carry the seeds off. The consequence here is that I get Trillium seedlings coming up in the lawn and in unwanted places. These are easy enough to transplant when I notice them, but determining what species they are can't be done for many more years!
Because dirt doesn't make for a thrilling background, I took the liberty of placing a seedpod on one of the stepping stones of my garden.
Nylanderia faisonensis is a nonnative woodland species that's slowly been invading areas rich in leaf litter. Nylanderia is a genus of tramp ants which are accidentally imported all over the world. Not all ants are ideal at planting seeds, and this is one of them. The ants are too small to carry the seeds anywhere, so instead of dispersing them as the plant wanted, the ants simply feed on the elaiosome where they found the seed.
Tetramorium caespitum, Pavement Ants, do a better job but also are not native. Studies have been coming out finding that Nonnative Ants tend to favor the seeds to Nonnative Plants. In this case the Tetramorium were more than happy to disperse these seeds for me. (My yard also lacks any nonnative plant that has elaiosome on the seeds.)
Another risk facing Trillium seeds is the ants eating the seed along with the elaiosome. Trillium seeds tend to be rock hard for the first two years then soften up as they go to germinate. They are said to produce a fowl smell which is probably meant to encourage ants to move their nest elsewhere!
The ideal ant genus to be doing this seems to be Aphaenogaster which form abundant colonies of ~2000 ants throughout woodland settings. They're also very much in the habit of changing their nest location, so as the colonies move around they leave seed banks behind where plants like Trilliums tend to grow. There used to be a colony of Aphaenogaster rudis under this stepping stone which is why I picked it, sadly it seems the colony has moved on.
Two Pavement Ants trying to carry a Trillium seed home.
These ants are just big enough to handle the seed, though it still takes two of them to move it. Sometimes ants will actually give up after carrying the seeds a few feet. The seed is still dispersed from the parent plant but slightly at risk of being eaten by a rodent. Trilliums naturally grow best where there is plenty of leaf litter decomposing, and it's likely in these kinds of settings such discarded seeds are still successful.
I love this shot.
The larger, ground nesting, Camponotus castaneus does a great job of dispersing seeds too. In the past I had assumed the seeds might get lost 4' underground where these ants like to nest. As it turns out though after bringing the seeds home, they're discarded a short while later, once the elaiosome has dried up typically. While the seeds may not be planted, they are dispersed and left in the colony midden pile (trash heap) which is still better than nothing.
These are one of the most elegant ants in my opinion and I love their chestnut brown and orange color tone.