Manufacture and deploy automated robot soldiers to attack your foes and defend your factory!
My robot army is shooting my tank as I'm trying to support them. They also shoot my AAI tanks that are supporting them. It seems like it's squads that randomly aggro on them, not all units at once.
typically area-effect weapons will cause this to happen. I can't fix it, it's a factorio Biter AI thing as far as I know. Sorry!