In the bunch of times I have tried the AI is completely incapable of dealing with the defensive structures and making their way to the enemy to fight. They just bunch up at the bottom of the walls and stand there waiting to die from arrows.
I have tried using many different battle commands and having them follow me, it just does not work properly. Please take a look when you have a chance.