Here is what you do to get a real alliance. First you must check what the AI temperament is, are they expansionist/defensive or reliable/untrustworthy. After you have picked an AI that is of a loyal sort of trait you will want to send him some gifts.
For example money is always a good starting point to build relationship, as soon as you can get that AI to sign a non-aggression pact you are on your way to an alliance, if you can get a trade agreement in at the same time even better. Getting a Military Alliance is a bit harder, you'll need to see how the game plays out and who becomes that AI's enemy. Once that happens you'll want to declare war on his enemy and help him vanquish his foes and kill any captives you get from his enemy.
After a few battles you will probably propel you status to 100/200 points and you should be able to ask him for Military Access or maybe even a Military Alliance and boom you have a partner for the game. This is not instant and requires you to PLAY YOUR GAME to get one. I currently have two military allies in my Roman legendary campaign.