I am still in the process of researching what are the good benefits of ants in our garden. I know that ants are very hard working little fellows that every humans should learned from. They work so well together as a team, which humans might forget how to do so sometimes.
But as we (ants and humans) co-exist in this planet, ants seem to cross the path of humans, like getting interested in our fruits trees, for instance. We have several fruit trees in our little yard like peaches, nactarines, cherries, pears, apples, etc, and noticed that ants have the same goal like us, to taste and savor the juicy sweet taste of the fruits.
This is not one hundred percent guarantee that works, but try to paint the tree bark all around the tree to hopefully divert ants away from the fruit trees. We usually use the white paint that are safe for plants and ground. A white paint that are specially manufactured for bark or tree painting, to keep insects like ants stay in the ground, and not climb up the trees eating the fruits. Like other paints, you need brush to paint it to the bark. usually from the bottom of the bark, up to around two to three feet high around the tree bark. Paint will peel over time, so painting needs to be re-done again after few months. This method doesnot always fully work, but it minimized the ants population in the fruit trees.
It is also a good idea that none of the branches and leaves of the fruit trees are touching the house, building, decks, pools, or any other stuff, that may work as a trail for the ants to get through your fruit trees. Try to cut branches that our touching any areas that ants will use as a short cut or road to access your tree aside from the ground to the bark, which you can paint (as mentioned above).