A few archers should be enough to handle most early wars. The AI is pretty dumb and you can use rough terrain and river crossings to your advantage.
I just got an unpleasant shock in my latest game. Egypt declares war - fine, I was gunning for them anyway. Placed a couple of units outside their borders, but inside Greek borders in recently-captured Alexandria. Alex didn't like that - fair enough. Unlike the Egyptians he has iron, but I'm level teching and his Hoplites are already obsolete (which naturally doesn't stop him producing them).
Wars proceed as per usual - Egypt launches dumb attacks with nothing but chariots against cities, and splits those up to attack several cities while I more or less ignore them and deal with Greece. One Greek city burned, whole load of dead Hoplites.
Then I go for Alexandria. I'm happily bombarding the city; Greek reinforcements start to appear on the horizon, so I reposition to repel them. And then Companion Cavalry comes out of nowhere and wipes one of my archer units with a rear attack, before vanishing back into fog of war. Next turn it's back, placing itself in front of my swordsmen to give the Greek pikes their supporting unit bonus - swordsmen are gone too, despite being in a forest. I manage to get rid of those, but a few turns later yet more come out to hunt my own damaged horsemen. By that point I'm in control of Alexandria, but I've been pretty battered and don't have many units near the city - needless to say, when I eventually did lose Alexandria it was to another Companion Cav unit after catapults, archers and chariots had taken down the defences.
Considering how little credit many people give cavalry units generally, the AI might almost have been playing war better than some humans - has anyone else encountered anything like that? This was an AI that was successfully exploiting not just cavalry's advantage, but also the fact that Greece had the fastest land unit in the game and the line of sight of my own units - the cavalry always retreated behind pikes or swords so that I couldn't get any units in sight range of them.
EDIT: This was Emperor and I was exploiting Songhai's early gold advantage to rush-buy a bunch of archers and a couple of horsemen early on, with a barracks in my capital and Honor (hence a GG). All in all I had a far larger army than I usually would at that point in an Emperor game, despite having expanded to my fourth city by about turn 100 without going Liberty, and don't normally encounter that much early aggression. Does anyone know if there's a diplomatic effect of having too large an early army - that you'll be seen as a threat and others will attack you more quickly than they otherwise might? When the pointy sticks league came up, I was almost (but not quite) at the bottom, but I'd lost a few units by then.