In Medieval your King actually loses one influence point if you decide to attack an ally, so I think the AI loses one too - if it decides to attack an ally.

I don't know if it's intentional, but alliances between same-religion factions do tend to last longer, if it's because of the pope (for Catholic factions) or because of some piece of code I don't know.

Also, In Medieval your allies do tend to help you out (say when you'r being besieged) something I have yet to see in Rome. I reckon this is due to the somewhat more simple map in Medieval, which seems to work way better for the AI.

Still, even in Medieval alliances don't tend to be a decisive factor for a faction to determine if a war is worthwhile. Factions may seek an alliance one turn, and decide to attack you only moments later. Usually when you're busy fighting a war on your other frontier