If you have potted plants, you are in luck. Grab some shallow saucers or trays and fill them with a thin layer of water and a drop of dish soap. Set your pots in these moats. Ants aren’t good swimmers, and the soap breaks the surface tension so they actually sink. It’s like a tiny version of the English Channel, but for suicidal insects.
For plants in the ground, try sprinkling diatomaceous earth (DE) around the base. It looks like harmless dust to us, but to an ant? It’s like walking through broken glass. It dries out their exoskeleton. Get the food-grade kind so it's safe for pets and kids, just don’t breathe it in—you aren’t an ant.