Cut off their resources and hold your frontline. Starve them of income and their advances lose momentum — that's the basic principle.
From what players have observed, using the minimap's "attack here" and "defend here" commands works well. Your AI teammates will follow those orders as closely as they're able.