Ants and plants have complex relationships. Some plants produce extra-floral nectarines to feed ants. The ants then protect the plant from other insects.
https://link.springer.com/article/10.1007/s11829-014-9338-8
Fava beans are one of these species that actively attract ants to them.
https://royalsocietypublishing.org/doi/10.1098/rspb.2015.1835
So in this case the ants are your friends helping the plant fight off other insects.