This short guide contain some tips to defeat AI.
Guide to Beat the AI
Even if the ai rushes you, you should have around the same amount of units they come at you with. Build those small unit buildings early. Stack up the militia, the dreaths, whatever your faction has. They seem weak but 20 of them pack a punch. Even the rats are useful.
There are also little camps where you can find 10-15 free units, often close to your starting town. Useful early but you shouldn’t even need them. The ai can probably use them too, so if they have more units than you that could be why.
Then figure out how to battle. Which enemies to focus first, which ones to kite, which ones to save for last (those singing support ones) The same exact battle can have drastically different outcomes. You can mess up and lose 20 units to 3 brutes because you let them get close and strike first.